-
Notifications
You must be signed in to change notification settings - Fork 43
51 lines (41 loc) · 1.46 KB
/
tests.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
name: Tests
on:
push:
pull_request:
pull_request_target:
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
django-version: [ "4.2", "5.0", ]
cryptography-version: [ "41.0" ]
exclude:
- python-version: 3.8
django-version: 5.0
- python-version: 3.9
django-version: 5.0
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}, cryptography ${{ matrix.cryptography-version }}
steps:
- name: Acquire sources
uses: actions/checkout@v4.1.1
- name: Setup Python
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Apply caching of dependencies
uses: actions/cache@v3.3.2
with:
path: ~/.cache/pip
key: os=${{ matrix.os }}-python=${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements-*.txt') }}
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements.txt -r requirements/requirements-test.txt django~=${{ matrix.django-version }} cryptography~=${{ matrix.cryptography-version }}
- name: Initialize demo
run: python dev.py init-demo
- name: Run tests
run: pytest -v --cov-report term-missing --durations=20