-
Notifications
You must be signed in to change notification settings - Fork 11
114 lines (98 loc) · 2.92 KB
/
test.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Test
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.6", "3.7"]
django-version: ["1.11", "2.2"]
grappelli: ["0", "1"]
s3: ["0", "1"]
exclude:
- python-version: "2.7"
django-version: "2.2"
- grappelli: "1"
s3: "1"
- python-version: "3.7"
django-version: "1.11"
- python-version: "3.8"
django-version: "1.11"
- python-version: "3.6"
s3: "1"
include:
- python-version: "2.7"
python-bin: python2
- python-version: "3.6"
python-bin: python3
- python-version: "3.7"
python-bin: python3
- s3: "1"
name-suffix: " with S3 storage"
- grappelli: "1"
name-suffix: " with grappelli"
- s3: "0"
grappelli: "0"
name-suffix: ""
runs-on: ubuntu-latest
name: Django ${{ matrix.django-version }}${{ matrix.name-suffix }} (Python ${{ matrix.python-version }})
env:
DJANGO: ${{ matrix.django-version }}
GRAPPELLI: ${{ matrix.grappelli }}
S3: ${{ matrix.s3 }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup chromedriver
uses: nanasess/setup-chromedriver@v1.0.5
- name: Install system dependencies
run: |
sudo .github/workflows/apt-get-update.sh
sudo apt-get install -y exempi gifsicle
- name: Install tox
run: |
${{ matrix.python-bin }} -m pip install tox tox-gh-actions
- name: Run tests
run: |
tox -- -v --selenosis-driver=chrome-headless || \
tox -- -v --selenosis-driver=chrome-headless || \
tox -- -v --selenosis-driver=chrome-headless
- name: Upload junit xml
if: always()
uses: actions/upload-artifact@v2
with:
name: junit-reports
path: reports/*.xml
- name: Combine coverage
run: tox -e coverage-report
- name: Upload coverage
run: tox -e codecov
env:
CODECOV_NAME: ${{ github.workflow }}
report:
if: always()
needs: build
runs-on: ubuntu-latest
name: "Report Test Results"
steps:
- uses: actions/download-artifact@v2
with:
name: junit-reports
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.8
if: always()
with:
files: ./*.xml
report_individual_runs: true
success:
needs: build
runs-on: ubuntu-latest
name: Test Successful
steps:
- name: Success
run: echo Test Successful