Skip to content

Commit 747d6c8

Browse files
ci: Replace test-worker
1 parent 6c56d40 commit 747d6c8

File tree

2 files changed

+43
-87
lines changed

2 files changed

+43
-87
lines changed

.github/workflows/test-suite.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/test-worker.yml

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,66 @@
1-
name: Run Python tests
1+
name: Run Test Suite
22

3-
on: [ push ]
3+
on:
4+
workflow_dispatch:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
env:
11+
PIP_DISABLE_PIP_VERSION_CHECK: 1
12+
COVERAGE_IGOR_VERBOSE: 1
13+
FORCE_COLOR: 1 # pytest output color
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
421

522
jobs:
6-
build:
23+
tests:
24+
name: "${{ matrix.python-version }} on ${{ matrix.os }}"
25+
runs-on: "${{ matrix.os }}-latest"
726

8-
name: Run tests
9-
runs-on: ubuntu-latest
1027
strategy:
28+
fail-fast: false
1129
matrix:
30+
os:
31+
- ubuntu
32+
- windows
33+
- macos
1234
python-version: ["3.9", "3.10", "3.11", "3.x"]
1335

14-
1536
steps:
16-
- uses: actions/checkout@v3
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
1739

1840
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
41+
uses: actions/setup-python@v5
2042
with:
2143
python-version: ${{ matrix.python-version }}
2244

23-
- name: Install dependencies
45+
- name: Install Python dependencies
2446
run: |
25-
python -m pip install -U pip
26-
python -m pip install -U coverage pytest pytest-cov poetry
47+
set -xe
48+
python -m pip install poetry coverage pytest
2749
python -m poetry install
2850
python -m poetry self add poetry-plugin-export
2951
python -m poetry export -f requirements.txt --output requirements.txt
3052
python -m pip install -r requirements.txt
3153
32-
- name: Lint with Ruff
33-
run: |
34-
python -m pip install -U ruff
35-
ruff --per-file-ignores="__init__.py:F401" --per-file-ignores="__init__.py:E402" .
36-
continue-on-error: true
37-
3854
- name: Test with pytest
3955
run: |
40-
coverage run -m pytest -v -s
56+
set -xe
57+
python -m pytest -sv
4158
42-
- name: Generate Coverage Report
43-
run: |
44-
coverage report -m
59+
success:
60+
name: Tests Successful
61+
runs-on: ubuntu-latest
62+
needs: tests
63+
64+
steps:
65+
- name: Whether the whole test suite passed
66+
uses: re-actors/alls-green@release/v1.2.2

0 commit comments

Comments
 (0)