-
Notifications
You must be signed in to change notification settings - Fork 38
95 lines (75 loc) · 2.14 KB
/
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: "1"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test_full:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: setup.cfg
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
pip --version
- run: python -m pip install pre-commit
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
- name: Full install
run: pip install -e '.[dev]'
- name: mypy
run: |
python -m mypy
- name: Run tests
run: pytest -v tests --cov --cov-report=xml --cov-config=pyproject.toml
- name: Upload coverage report
uses: codecov/[email protected]
test_core:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ["3.8", "3.9", "3.10"]
steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.pyv }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyv }}
cache: 'pip'
cache-dependency-path: setup.cfg
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
pip --version
- name: Install core
run: |
pip install -e '.[tests]'
- name: Run tests
run: pytest -v tests --ignore=tests/frameworks