Repository navigation
65 lines (53 loc) · 1.94 KB
/
Copy pathci.yml
File metadata and controls
65 lines (53 loc) · 1.94 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
name: CI
on:
push:
branches:
- master # Runs the tests on push to the 'master' branch
pull_request: # Checks the changes before merging them
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python 3.15
uses: actions/setup-python@v5
with:
python-version: '3.15'
# make creates the environment (venv) with the Python installed in the
# previous step
- name: Run ruff, mypy and pyright
run: make check PYTHON=python
test:
# The tests use the real API with the repository secrets, which are not
# available in pull requests from forks.
if: >-
github.event_name == 'push'
|| github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
# The versions run one at a time: they all use the same LibreDTE
# account, and in parallel one job could delete the temporary DTEs that
# another one is checking. A failure in one version does not cancel the
# others.
strategy:
fail-fast: false
max-parallel: 1
matrix:
# From the minimum (requires-python) to the latest supported version
python-version: ['3.13', '3.14', '3.15']
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }} # Sets the Python version from the matrix
- name: Display Python version
run: python --version
# make creates the environment (venv) with the package and the dev
# group of pyproject.toml, and fails if any test fails
- name: Run Python tests
env:
LIBREDTE_HASH: ${{ secrets.LIBREDTE_HASH }}
LIBREDTE_RUT: ${{ vars.LIBREDTE_RUT }}
run: make tests-readonly PYTHON=python