Test ruleset #1
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: Run Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-api: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python environment | |
| id: seed | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| database-path: ${{ vars.TEST_DATABASE_PATH || './test_dogshelter.db' }} | |
| - name: Run tests | |
| run: python -m unittest test_app -v | |
| working-directory: ./server | |
| env: | |
| DATABASE_PATH: ${{ steps.seed.outputs.database-file }} | |
| test-e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python environment | |
| id: seed | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| database-path: ${{ vars.TEST_DATABASE_PATH || './test_dogshelter.db' }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: 'client/package-lock.json' | |
| - name: Install Node dependencies | |
| working-directory: ./client | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| working-directory: ./client | |
| run: npx playwright install --with-deps chromium | |
| - name: Run e2e tests | |
| working-directory: ./client | |
| run: npx playwright test | |
| env: | |
| DATABASE_PATH: ${{ steps.seed.outputs.database-file }} |