Prod Test #3
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: Prod Test | |
| on: | |
| workflow_run: | |
| workflows: ["Release Image"] | |
| types: [completed] | |
| jobs: | |
| test: | |
| if: github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Pull and tag production image | |
| run: | | |
| SHA=$(echo ${{ github.event.workflow_run.head_sha }} | cut -c1-7) | |
| echo "Pulling production image with SHA: ${SHA}" | |
| docker pull ghcr.io/${{ github.repository }}:${SHA} | |
| docker tag ghcr.io/${{ github.repository }}:${SHA} copaw:latest | |
| - name: Make test script executable | |
| run: chmod +x ./scripts/test-startup.sh | |
| - name: Run startup tests | |
| run: ./scripts/test-startup.sh --ci | |
| - name: Show logs on failure | |
| if: failure() | |
| run: docker compose logs --tail=200 | |
| - name: Cleanup | |
| if: always() | |
| run: docker compose down -v |