-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (78 loc) · 2.67 KB
/
vendor_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Django Vendor CI
on:
push:
branches: [master]
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:11
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: vendor
# Set health checks to wait until postgres has started
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install mistune==0.8.4
python -m pip install m2r
python -m pip install -r requirements.dev.txt
python -m pip install -e .
- name: Run Core Tests
run: |
cd develop
python manage.py test
python manage.py makemigrations --check --dry-run
env:
DJANGO_DEBUG: 1
DATABASE_URL: postgres://postgres:[email protected]:5432/vendor
- name: Run Base Processor Tests
run: |
cd develop
python manage.py test vendor.tests.test_processor.BaseProcessorTests
env:
DJANGO_DEBUG: 1
DATABASE_URL: postgres://postgres:[email protected]:5432/vendor
# - name: Run Authorize.Net Tests
# run: |
# cd develop
# python manage.py test vendor.tests.test_processor.AuthorizeNetProcessorTests --exclude-tag external
# env:
# DJANGO_DEBUG: 1
# DATABASE_URL: postgres://postgres:[email protected]:5432/vendor
# AUTHORIZE_NET_API_ID: ${{ secrets.AUTHORIZE_NET_API_ID }}
# AUTHORIZE_NET_TRANSACTION_KEY: ${{ secrets.AUTHORIZE_NET_TRANSACTION_KEY }}
# AUTHORIZE_NET_TRANSACTION_TYPE_DEFAULT: "authCaptureTransaction"
# VENDOR_PAYMENT_PROCESSOR: "authorizenet.AuthorizeNetProcessor"
- name: Build Package
run: |
python -m pip install --upgrade build
python3 -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}