test: add vitest and rtl tests for client #11
Workflow file for this run
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| app: | |
| name: "App" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: "Install uv and set the Python version" | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: "Install Dependencies" | |
| run: uv sync --locked --dev | |
| - name: "Run Pytest and Coverage" | |
| run: uv run pytest | |
| client: | |
| name: "Client" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "./client" | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v5 | |
| - name: "Setup Node.js" | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| cache: "npm" | |
| cache-dependency-path: "client/package-lock.json" | |
| - name: "Install Dependencies" | |
| run: npm ci | |
| - name: "Run Vitest & RTL" | |
| run: npm run test |