-
Notifications
You must be signed in to change notification settings - Fork 1.2k
53 lines (49 loc) · 1.39 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
52
53
name: tests
on:
push:
branches:
- master
pull_request:
# TODO: enable this
#env:
# PYTHONWARNINGS: error,default::DeprecationWarning
jobs:
unit-tests:
name: unit tests
runs-on: ${{ matrix.os }}
timeout-minutes: 1
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
#run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
steps:
- uses: actions/checkout@v4
- name: install uv and dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
# TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed
uv pip install -e .[testing,docs] setuptools
- run: uv run scons -j8
- run: uv run pytest .
static-analysis:
name: static analysis
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- run: sudo apt install --no-install-recommends -y cppcheck
- name: setup python
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
uv pip install -e . pre-commit
- name: cache pre-commit environments
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- run: uv run pre-commit run --all