help #940
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
| # End-to-end tests for COKI Open Access Dashboard web application | |
| name: "e2e Tests" | |
| on: push | |
| jobs: | |
| e2e-test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Environment | |
| uses: ./.github/actions/setup-environment | |
| with: | |
| bucket_name: ${{ secrets.BUCKET_NAME }} | |
| gcp_credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| playwright: true | |
| - name: Load Local D1 Database | |
| working-directory: ./workers-api | |
| env: | |
| WRANGLER_LOG: error # yarn run wrangler d1 prints out too much information so only log errors | |
| run: | | |
| yarn run build # Creates ../data/data/db.sql | |
| yarn run wrangler d1 execute DB --file ../data/data/db.sql --local --config wrangler.local.toml | |
| - name: Run e2e Tests | |
| working-directory: ./dashboard | |
| run: | | |
| yarn run test:e2e | |
| - name: Upload Playwright Test Results to Cloud Storage | |
| if: failure() | |
| working-directory: ./dashboard | |
| run: | | |
| export FOLDER=playwright_$(date +"%Y-%m-%d_%H:%M:%S")_${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} | |
| mv test-results ${FOLDER} | |
| gsutil -m cp -R ${FOLDER} gs://${{ secrets.TEST_ARTIFACT_BUCKET_NAME }}/e2e-tests/${FOLDER} | |
| shell: bash |