-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (40 loc) · 1.18 KB
/
Copy pathunit_tests.yaml
File metadata and controls
44 lines (40 loc) · 1.18 KB
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
# Workflow file for fast unit tests which run on all commits
name: Unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
- run: ruff format --check
unit-tests:
name: Unit tests
needs: ruff # avoid wasting CI time if static analysis failed
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Conda environment from environment.yaml
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yaml
auto-activate-base: false
- name: Install and run tests (Linux)
if: runner.os == 'linux'
uses: ./.github/actions/linux
with:
pytest-options: '-m "not slow"'
- name: Install and run tests (MacOS/Windows)
if: runner.os != 'linux'
uses: ./.github/actions/windows-mac