Skip to content

Commit 8c64b9e

Browse files
committed
Add github workflow to run unit tests
1 parent 76ca691 commit 8c64b9e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/python-app.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Unit Tests
5+
6+
on:
7+
[push, pull_request]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.10", "3.11", "3.12", "3.13"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements-dev.txt
31+
- name: Test with pytest
32+
run: |
33+
# editable is necessary as pytest will run against the installed
34+
# package rather than the local files creating a coverage report of 0%
35+
pip install -r requirements-dev.txt
36+
pytest --cov-report=html --cov=packages/data --cov=packages/utils --cov=packages/pipeline --cov=packages/training
37+
38+

0 commit comments

Comments
 (0)