-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 876 Bytes
/
test.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
name: test
on:
pull_request:
push:
branches:
- main
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: pdm install
- if: matrix.python-version == '3.10' && runner.os == 'Linux'
name: Lint
run: pdm run lint
- name: Run tests
run: pdm run test