From 28fe39d4dca4c688c6b6c5b0848ee3fc02ad0425 Mon Sep 17 00:00:00 2001 From: enpitsulin Date: Sun, 21 Apr 2024 14:14:21 +0800 Subject: [PATCH] ci: improved github actions --- .github/workflows/e2e.yml | 37 +++++++++++++++++++ .github/workflows/{submit.yml => release.yml} | 0 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/e2e.yml rename .github/workflows/{submit.yml => release.yml} (100%) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..f708c3a --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,37 @@ +name: Playwright e2e testing +on: + push: + branches: [master] + pull_request: + branches: [master] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v3 + with: + version: latest + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Install Playwright Browsers + run: npx playwright install --with-deps + + - name: Run Playwright tests + run: npx playwright test + + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.github/workflows/submit.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/submit.yml rename to .github/workflows/release.yml