-
Notifications
You must be signed in to change notification settings - Fork 67
71 lines (69 loc) · 2.14 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
name: Tox tests
on: [push, pull_request]
jobs:
test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11.x, 3.10.x, 3.9]
django: [42, 32]
sekizai: [sekizai,nosekizai]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ format('py-django{1}-{2}', matrix.python-version, matrix.django, matrix.sekizai) }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-tox-${{ format('py-django{1}-{2}', matrix.python-version, matrix.django, matrix.sekizai) }}-
- name: Install dependencies
run: |
sudo apt-get install gettext
python -m pip install --upgrade pip tox>4
- name: Test with tox
env:
TOX_ENV: ${{ format('py-django{1}-{2}', matrix.python-version, matrix.django, matrix.sekizai) }}
COMMAND: coverage run
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
tox -e$TOX_ENV
.tox/$TOX_ENV/bin/coverage xml
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ./coverage.xml
fail_ci_if_error: false
services:
redis:
image: redis
ports:
- 6379:6379
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true