-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (37 loc) · 898 Bytes
/
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
name: Lint and test
on:
pull_request:
branches: [ main ]
permissions:
contents: write
jobs:
check-lint:
name: Lint check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
with:
python-version: 3.11
cache: true
- run: pdm sync -G dev --no-default
- run: pdm run lint
pr-tests:
name: PR tests
runs-on: ${{ matrix.os }}
needs: check-lint
strategy:
matrix:
python-version: ['3.11', '3.12']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
cache: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pdm sync -G test
- name: Run tests
run: pdm run -v test