Repository navigation
64 lines (52 loc) · 1.93 KB
/
Copy pathci.yml
File metadata and controls
64 lines (52 loc) · 1.93 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
name: CI
on:
push:
branches:
- master # Runs the checks on push to the 'master' branch
pull_request: # Checks the changes before merging them
jobs:
check:
runs-on: ubuntu-latest
strategy:
# Run every version even if one fails, to see all the results
fail-fast: false
matrix:
# From the minimum supported version (requires-python) to the
# newest one
python-version: ['3.11', '3.12', '3.13', '3.14', '3.15']
steps:
- name: Check out repository code
uses: actions/checkout@v7
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
# make creates the environment (venv) with the Python installed in the
# previous step; mypy and pyright check with the rules of that version
- name: Run ruff, mypy and pyright
run: make check PYTHON=python
test:
# The tests that use the real API need the repository secrets. Without
# them (e.g. pull requests from forks) those tests are skipped and the
# tests without network still run.
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14', '3.15']
steps:
- name: Check out repository code
uses: actions/checkout@v7
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- 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:
BHEXPRESS_API_TOKEN: ${{ secrets.BHEXPRESS_API_TOKEN }}
BHEXPRESS_EMISOR_RUT: ${{ vars.BHEXPRESS_EMISOR_RUT }}
run: make tests-readonly PYTHON=python