-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (43 loc) · 1.47 KB
/
test.yaml
File metadata and controls
52 lines (43 loc) · 1.47 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
45
46
47
48
49
50
51
52
# path .github/workflows/test.yaml
# This workflow runs unit tests on every PR and after merges.
# Features (as defined in project header):
# - runs per PR level and after merge
# - checks out code
# - sets up Python environment
# - installs dependencies via requirements.txt
# - installs pytest and pytest-asyncio as test tool
# - runs tests via pytest ./scl/test/
name: Unit Tests
on:
push:
branches: [ main ] # after merge
pull_request: # per PR level
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.13' ]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install test tools
run: pip install pytest pytest-asyncio
- name: Run unit tests
run: pytest ./scl/test/
# Example usage:
# This workflow is automatically triggered by:
# - Pushing to main/master
# - Creating, updating, or reopening a pull request targeting main/master
# Developers can also manually trigger it via the "Actions" tab if needed.
# To debug, inspect the "Run unit tests" step logs in the GitHub Actions console.
# run test via pytest ./scl/test/