-
Notifications
You must be signed in to change notification settings - Fork 102
47 lines (42 loc) · 1.23 KB
/
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
name: Python CI
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
run_tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django32, django42]
steps:
- uses: actions/checkout@v2
- name: Python setup
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up test environment
run: |
sudo apt-get install xvfb
wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz
mkdir geckodriver
tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver
export PATH=$PATH:$(pwd)/geckodriver
export BOTO_CONFIG=/dev/null
- name: Install Requirements
run: |
pip install -r requirements/pip.txt
pip install -r requirements/ci.txt
- name: Run Tests
run: xvfb-run --server-args=-ac -- tox -e ${{ matrix.toxenv }}
- name: Upload coverage to CodeCov
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true