Add e2e test for dummy projects #8
Workflow file for this run
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: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
working-directory: dummy-e2e | |
run: npm ci | |
- name: Install ic-wasm | |
run: cargo install ic-wasm --version 0.3.5 | |
- name: Install Playwright Browsers | |
working-directory: dummy-e2e | |
run: npx playwright install --with-deps | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
- name: Start local replica | |
run: dfx start --background | |
- name: Deploy canisters | |
# We create the canisters first to have the ids when we build the frontend env vars | |
run: | | |
dfx deploy internet_identity | |
dfx deploy dummy_issuer | |
dfx deploy dummy_relying_party | |
- name: Prepare environment variables | |
working-directory: dummy-e2e | |
run: ./create-env-vars.sh | |
- name: Run Playwright tests | |
working-directory: dummy-e2e | |
run: npm run e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Stop local replica | |
run: dfx stop |