Pc 686 e2e nieuws werkinstructies #250
This file contains 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: Playwright Tests | |
on: | |
schedule: | |
- cron: '0 23 * * *' | |
pull_request: | |
branches: [ main, master ] | |
paths: ['Kiss.Bff.EndToEndTest/**'] | |
workflow_dispatch: | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright/dotnet:v1.49.0-noble | |
options: --user 1001 | |
env: | |
'PLAYWRIGHT_USERNAME': ${{ secrets.PLAYWRIGHT_USERNAME }} | |
'PLAYWRIGHT_PASSWORD': '${{ secrets.PLAYWRIGHT_PASSWORD }}' | |
'PLAYWRIGHT_TOTP_SECRET': ${{ secrets.PLAYWRIGHT_TOTP_SECRET }} | |
'PLAYWRIGHT_BASE_URL': ${{ secrets.PLAYWRIGHT_BASE_URL }} | |
defaults: | |
run: | |
working-directory: ./Kiss.Bff.EndToEndTest | |
steps: | |
- name: Set test var | |
run: | | |
echo "PLAYWRIGHT_BASE_URL=${{ secrets.PLAYWRIGHT_BASE_URL }}" >> $GITHUB_ENV | |
- run: | | |
echo ${{ env.PLAYWRIGHT_BASE_URL }} | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- run: dotnet build | |
- name: Run your tests | |
id: e2e | |
run: dotnet test | |
env: | |
'TestSettings:TEST_USERNAME': ${{ env.PLAYWRIGHT_USERNAME }} | |
'TestSettings:TEST_PASSWORD': '${{ env.PLAYWRIGHT_PASSWORD }}' | |
'TestSettings:TEST_TOTP_SECRET': ${{ env.PLAYWRIGHT_TOTP_SECRET }} | |
'TestSettings:TEST_BASE_URL': ${{ env.PLAYWRIGHT_BASE_URL }} | |
- name: Deploy to GitHub Pages | |
if: ${{ always() }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./Kiss.Bff.EndToEndTest/bin/Debug/net8.0/playwright-traces # directory of your reports | |
publish_branch: gh-pages/e2e # deploying to gh-pages branch |