-
Notifications
You must be signed in to change notification settings - Fork 69
43 lines (41 loc) · 1.37 KB
/
tests.yaml
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
name: tests
on:
- push
- pull_request
jobs:
test:
name: tests
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
django: [<2.3, <3.1, <3.2]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Setup Pip Cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: pip-${{ runner.os }}-${{ matrix.python }}-${{ matrix.django }}-${{ hashFiles('.github/**/*.yaml') }}-${{ hashFiles('setup.py') }}
- name: Setup Virtualenv Cache
id: cache-virtualenv
uses: actions/cache@v2
with:
path: /home/runner/.local/share/virtualenvs
key: virtualenv-${{ runner.os }}-${{ matrix.python }}-${{ matrix.django }}-${{ hashFiles('.github/**/*.yaml') }}-${{ hashFiles('setup.py') }}
- name: Install Python dependencies
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: |
pip install --upgrade pip
pip install --upgrade pipenv
pipenv install $DJANGO
pipenv install .
pipenv install --dev six pytest pytest-django pytest-selenium selenium
- name: Test
run: |
PYTHONPATH=`pwd` xvfb-run pipenv run pytest