-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.41 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
branches:
- main
paths:
- 'src/**'
- 'tests/**'
- '!**.pyi'
- 'tox.ini'
- 'pyproject.toml'
- 'pdm.lock'
- '.github/actions/setup-tox/**'
- '.github/workflows/test.yml'
push:
branches:
- main
- release/**
tags-ignore:
- '*'
paths:
- 'src/**'
- 'tests/**'
- '!**.pyi'
- 'tox.ini'
- 'pyproject.toml'
- 'pdm.lock'
- '.github/actions/setup-tox/**'
- '.github/workflows/test.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2022, macos-12]
python_version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Setup tox (python ${{ matrix.python_version }})
uses: ./.github/actions/setup-tox
with:
python-version: ${{ matrix.python_version }}
- name: Launch tests
run: tox run -f py$(echo ${{ matrix.python_version }} | tr -d .)