Skip to content

Commit

Permalink
Fix/playwright pipelines failing (#447)
Browse files Browse the repository at this point in the history
* needed secrets for pipeline, earlier test runs and dynamic folder path for test results
  • Loading branch information
Nyeng authored Dec 5, 2024
1 parent 5a3ed6c commit 8387872
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-deploy-at.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
uses: "./.github/workflows/template-test-playwright.yml"
with:
environment: ${{ matrix.environment }}
secrets:
USERNAME_TEST_API: ${{ secrets.USERNAME_TEST_API }}
PASSWORD_TEST_API: ${{ secrets.PASSWORD_TEST_API }}



Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scheduled-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Playwright tests (Authentication)

on:
schedule:
# Runs at 7:00 AM UTC every day
- cron: "0 7 * * *"
# Runs at 1:00 PM UTC every day
- cron: "0 13 * * *"
# Runs at 6:00 AM UTC every day
- cron: "0 6 * * *"
# Runs at 12:00 PM UTC every day
- cron: "0 12 * * *"

jobs:
playwright-scheduled:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/template-test-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ jobs:
curl -X POST -H 'Content-type: application/json' --data '{
"text": ":playwright: Frontend-tester feilet i testmiljø:`${{ inputs.environment }}` på repo: `${{ github.repository }}`. Mer detaljer her: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}' ${{ secrets.SLACK_WEBHOOK_URL }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: frontend/playwright/test-results/${{ inputs.environment }}
name: playwright-report-${{ inputs.environment }}-${{ github.run_id }}
path: frontend/playwright/test-results/${{ inputs.environment }}/${{ github.run_id }}
retention-days: 30

0 comments on commit 8387872

Please sign in to comment.