Patch test #1164
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
| # Install python and node. Run lint and unit tests. | |
| name: 'Basic (Unit) Tests' | |
| # **Why we have it**: Automatically run tests to ensure code doesn't introduce regressions. | |
| # **Who does it impact**: Python small-scale "unit" tests. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| # This allows a subsequently queued workflow run to interrupt previous runs | |
| concurrency: | |
| group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.9.4" | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --all-extras --dev | |
| npm ci | |
| - name: Lint | |
| run: | | |
| make lint-check | |
| - name: Build docs | |
| run: | | |
| make docs | |
| run-py-tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.9.4" | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --all-extras --dev | |
| npm ci | |
| - name: Run Tests | |
| run: make coverage | |
| - name: Check coverage | |
| run: make coverage-report | |
| run-js-tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| cache: 'npm' | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Run tests and check coverage | |
| run: make js-coverage |