From d4def14fc246d6a5067675986bc4574b81e5549a Mon Sep 17 00:00:00 2001 From: Kaia Peacock Date: Mon, 6 Jan 2025 12:05:00 -0800 Subject: [PATCH] moving playwright ci into e2e tests --- .github/workflows/e2e.yml | 17 ++++++ .github/workflows/playwright-svelte.yml | 81 ------------------------- 2 files changed, 17 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/playwright-svelte.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9204a1c175..c37980262d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -222,6 +222,23 @@ jobs: --frontend_url "$FRONTEND_URL_LOCALHOST" \ --candid_url "$CANDID_URL_LOCALHOST" \ --browser chromium firefox webkit + - name: Deploy default dfx project + - name: Deploy sveltekit starter project + run: | + ./target/debug/dfx new e2e_project --frontend sveltekit + pushd e2e_project + ./target/debug/dfx start --background --clean + ./target/debug/dfx canister create e2e_project_frontend --specified-id br5f7-7uaaa-aaaaa-qaaca-cai + ./target/debug/dfx deploy + popd + # Add any additional deployments here + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + # Runs all playwright tests + - name: Run Playwright tests + run: npx playwright test aggregate: name: e2e:required diff --git a/.github/workflows/playwright-svelte.yml b/.github/workflows/playwright-svelte.yml deleted file mode 100644 index d2326db332..0000000000 --- a/.github/workflows/playwright-svelte.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Playwright Svelte Tests -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - # When getting Rust dependencies, retry on network error: - CARGO_NET_RETRY: 10 - # Use the local .curlrc - CURL_HOME: . - -jobs: - build_dfx: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup environment variables - run: | - echo "RUSTFLAGS=--remap-path-prefix=${GITHUB_WORKSPACE}=/builds/dfinity" >> $GITHUB_ENV - - test: - runs-on: ubuntu-latest - needs: [build_dfx] - strategy: - fail-fast: false - env: - E2E_TEST: tests-${{ matrix.test }}.bash - steps: - - uses: actions/checkout@v4 - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Provision Linux - run: bash scripts/workflows/provision-linux.sh || bash scripts/workflows/provision-linux.sh - - name: Prepare environment - run: | - echo "archive=$(pwd)/e2e/archive" >> "$GITHUB_ENV" - echo "assets=$(pwd)/e2e/assets" >> "$GITHUB_ENV" - echo "utils=$(pwd)/e2e/utils" >> "$GITHUB_ENV" - export - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all-features - - name: Build dfx - run: cargo build --bin dfx - - name: Setting up Python - uses: actions/setup-python@v5 - with: - python-version: "3.9" - - name: Installing playwright - run: | - pip install playwright==1.40.0 - playwright install - playwright install-deps - - name: Deploy default dfx project - run: | - ./target/debug/dfx new e2e_project --frontend sveltekit - pushd e2e_project - ./target/debug/dfx start --background --clean - ./target/debug/dfx canister create e2e_project_frontend --specified-id br5f7-7uaaa-aaaaa-qaaca-cai - ./target/debug/dfx deploy - popd - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test