-
-
Notifications
You must be signed in to change notification settings - Fork 841
70 lines (58 loc) · 1.74 KB
/
ci.yml
File metadata and controls
70 lines (58 loc) · 1.74 KB
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
name: Continuous Integration
on:
push:
branches: [ master, ]
paths:
- '**.py'
- 'pyproject.toml'
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, ]
paths:
- '**.py'
- 'pyproject.toml'
jobs:
ci-job:
runs-on: ubuntu-latest
permissions:
contents: read
env:
DJANGO_SETTINGS_MODULE: settings.ci
DJANGO_MEDIA_ROOT: /tmp/wger-test
strategy:
matrix:
# Note: removed 3.14 because lingua-language-detector has no wheels yet
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
name: CI job (python ${{ matrix.python-version }})
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Display Python version
run: python --version
- name: Install dependencies
run: |
uv sync --group dev
mkdir /tmp/wger-test
# Only run the tests with coverage for one version of python
- name: Test the application with coverage
if: matrix.python-version == 3.13
run: |
uv run coverage run --source='.' ./manage.py test
uv run coverage lcov
- name: Test the application
if: matrix.python-version != 3.13
run: |
uv run ./manage.py test
- name: Coveralls
if: matrix.python-version == 3.13
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov