From bcec165c2f477808ebab1b7f0b88f12fdc1d1726 Mon Sep 17 00:00:00 2001 From: mini2024 Date: Thu, 3 Apr 2025 00:27:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=20GitHub=20Actions=20?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=B7=BB=E5=8A=A0=E5=90=8D=E7=A7=B0=E4=BB=A5?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/playwright.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml index c67532f..8d63242 100644 --- a/.github/workflows/playwright.yaml +++ b/.github/workflows/playwright.yaml @@ -14,11 +14,13 @@ jobs: outputs: url: ${{ steps.surge_deploy.outputs.url }} steps: - - uses: yanhao98/composite-actions/setup-node-environment@502d85b5b52619fd7b74aa48da428de4a4d2c87b - - run: pnpm run build-only + - name: ⚙️ Setup Node Environment + uses: yanhao98/composite-actions/setup-node-environment@502d85b5b52619fd7b74aa48da428de4a4d2c87b + - name: 🔨 Build Project + run: pnpm run build-only env: VITE_BUILD_COMMIT: ${{ github.sha }} - - name: 部署到 Surge + - name: 🚀 部署到 Surge id: surge_deploy if: ${{ github.actor != 'nektos/act' }} # https://nektosact.com/usage/index.html#skipping-steps uses: yanhao98/composite-actions/deploy-dist-to-surge@502d85b5b52619fd7b74aa48da428de4a4d2c87b @@ -27,10 +29,11 @@ jobs: runs-on: ubuntu-latest container: yanhao98/runner-images:pnpm-with-playwright steps: - - uses: yanhao98/composite-actions/setup-node-environment@502d85b5b52619fd7b74aa48da428de4a4d2c87b - - name: Install Playwright Browsers + - name: ⚙️ Setup Node Environment + uses: yanhao98/composite-actions/setup-node-environment@502d85b5b52619fd7b74aa48da428de4a4d2c87b + - name: 📥 Install Playwright Browsers run: pnpm exec playwright install --with-deps - - name: Run Playwright tests + - name: ▶️ Run Playwright tests run: npx playwright test env: BASE_URL: ${{ needs.surge.outputs.url }}