-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.08 KB
/
unit-tests.yml
File metadata and controls
42 lines (35 loc) · 1.08 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
name: Unit Tests
on:
push:
branches: [master] # Only run push on default branch after merge
pull_request: # Run on all PRs
# Cancel in-progress runs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 3.6 and 3.7 not supported on free runners Ubuntu >= 24.04
python-version: ['3.8', '3.9']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
tests/python/unit/requirements.txt
code-env/python/spec/requirements.txt
- name: Install dependencies
run: |
pip install -r tests/python/unit/requirements.txt
pip install -r code-env/python/spec/requirements.txt
- name: Run tests
env:
PYTHONPATH: python-lib
run: pytest tests/python/unit -v