-
Notifications
You must be signed in to change notification settings - Fork 137
67 lines (65 loc) · 1.95 KB
/
pr_check.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
60
61
62
63
64
65
66
67
name: PR Test
on:
push:
branches:
- 'master'
- 'develop'
- 'releases/*'
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
# This is what will cancel the workflow concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
pr_test:
if: |
github.event.pull_request.draft == false &&
!(startsWith(github.event.pull_request.title, '[WIP]')) &&
!(startsWith(github.event.pull_request.title, '[Dependent]'))
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-2022']
python-version: ['3.10']
include:
- python-version: "3.10"
tox-env-py: "310"
- os: "ubuntu-20.04"
tox-env-os: "lin"
- os: "windows-2022"
tox-env-os: "win"
name: pr test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Installing python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies
run: |
python -m pip install tox
- name: Unit testing
run: |
tox -vvv -e tests-py${{ matrix.tox-env-py }}-${{ matrix.tox-env-os }} --develop -- tests/unit --cov --cov-report=xml
- name: Integration testing
run: |
tox -vvv -e tests-py${{ matrix.tox-env-py }}-${{ matrix.tox-env-os }} -- tests/integration
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
flags: ${{ matrix.os }}_Python-${{ matrix.python-version }}