-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (60 loc) · 1.69 KB
/
run-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
---
# used for running tests
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pre_commit_checks:
runs-on: ubuntu-22.04
steps:
# checks out the repo
- uses: actions/checkout@v4
with:
# fetch tags for versioning details
fetch-depth: 0
- name: Fetch tags
run: git fetch --all --tags
# run pre-commit
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup for poetry
run: |
python -m pip install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install environment
run: poetry install --no-interaction --no-ansi
- uses: pre-commit/action@v3.0.1
run_tests:
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# fetch tags for versioning details
fetch-depth: 0
- name: Fetch tags
run: git fetch --all --tags
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Setup for poetry
run: |
python -m pip install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install environment
run: poetry install --no-interaction --no-ansi
- name: Run pytest
# run all tests except those marked generate_report_image
run: poetry run pytest -m "not generate_report_image"