-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (65 loc) · 1.91 KB
/
unit_tests.yml
File metadata and controls
72 lines (65 loc) · 1.91 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: unit tests
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/unit_tests.yml
- .github/workflows/integration_tests.yml
- '**.py'
- '**.ipynb'
- uv.lock
- pyproject.toml
- '**.rst'
- '**.md'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/unit_tests.yml
- .github/workflows/integration_tests.yml
- '**.py'
- '**.ipynb'
- uv.lock
- pyproject.toml
- '**.rst'
- '**.md'
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
with:
# Install a specific version of uv.
version: "0.5.21"
enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --all-extras --dev
- name: Install dependencies and check code
run: |
uv run pytest -m "not integration_test" --cov src/aixpert --cov-report=xml tests
# Uncomment this once this repo is configured on Codecov
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# slug: VectorInstitute/aixpert
# fail_ci_if_error: true
# verbose: true