-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.44 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
test-core:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8.18", "3.9.18", "3.10.13"]
steps:
- uses: actions/checkout@v3
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install -U pytest pytest-cov
- name: Run tests
run: PYTHONPATH=src pytest --no-cov tests/test_core
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11.6", "3.12.0"]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry==1.7.0
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Use python ${{ matrix.python-version }} for poetry
run: poetry env use ${{ matrix.python-version }}
- name: Install dependencies
run: poetry install
- name: Run pre-commit linters and checks
run: poetry run pre-commit run --all-files
if: ${{ matrix.python-version == '3.11.5' }}
- name: Check typing with mypy
run: poetry run mypy --strict
- name: Run tests
run: poetry run pytest tests