-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (34 loc) · 1.09 KB
/
unit_test.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
name: Run Unit Tests
on:
push:
branches:
- '*' # Trigger on every branch
pull_request:
branches:
- '*' # Trigger on pull requests for any branch
jobs:
unit_tests:
name: Run Unit Tests on Multiple Python Versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11, 3.12] # List of Python versions to test
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }} # Use Python version from the matrix
cache: 'pip'
- name: Install Hatchling (build system)
run: |
pip install hatchling
- name: Install dependencies and pytest
run: |
pip install .[dev] pytest # This installs both dev dependencies and pytest explicitly
- name: Run Unit Tests
run: |
python -m pytest tests/tests_unit # Adjust the path if necessary
env:
PYTHONPATH: . # Set PYTHONPATH to include your project root (if needed for imports)