Merge pull request #30 from VectorInstitute/add_docs #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: unit tests | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
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 | |
- develop | |
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/[email protected] | |
- name: Install uv | |
uses: astral-sh/[email protected] | |
with: | |
# Install a specific version of uv. | |
version: "0.5.21" | |
enable-cache: true | |
- name: "Set up Python" | |
uses: actions/[email protected] | |
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 vec_inf --cov-report=xml tests | |
# Uncomment this once this repo is configured on Codecov | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: VectorInstitute/vec-inf | |
fail_ci_if_error: true | |
verbose: true |