Treat Vestaboard 409 (identical message) as unchanged, not an error #28
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: CI | |
| # Runs tests and validates the Docker image builds on every push and PR. | |
| # Publishing to GHCR happens separately in publish.yml (on release). | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| cache-dependency-path: 'web/requirements.txt' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r web/requirements.txt pytest | |
| - name: Run tests | |
| env: | |
| WSDOT_API_KEY: test_key_for_ci | |
| run: | | |
| cd web | |
| python -m pytest -q | |
| build: | |
| name: Build Docker Image | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build image (no push) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: deployment/Dockerfile | |
| push: false | |
| tags: ferrynotifier:ci-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |