Training and Evaluation #19
This file contains hidden or 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 | |
| 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 |