chore(ci): reorganize CI workflows and add depcheck and playwright jobs
This commit is contained in:
33
.github/workflows/playwright.yaml
vendored
Normal file
33
.github/workflows/playwright.yaml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
on:
|
||||
push:
|
||||
jobs:
|
||||
surge:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
url: ${{ steps.surge_deploy.outputs.url }}
|
||||
steps:
|
||||
- uses: yanhao98/composite-actions/setup-node-environment@main
|
||||
- run: pnpm run build-only
|
||||
env:
|
||||
VITE_BUILD_COMMIT: ${{ github.sha }}
|
||||
- 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@main
|
||||
playwright:
|
||||
needs: surge
|
||||
runs-on: ubuntu-latest
|
||||
container: yanhao98/runner-images:pnpm-with-playwright
|
||||
steps:
|
||||
- uses: yanhao98/composite-actions/setup-node-environment@main
|
||||
# - name: Install Playwright Browsers
|
||||
# run: pnpm exec playwright install --with-deps
|
||||
- name: Run Playwright tests
|
||||
run: npx playwright test
|
||||
env:
|
||||
BASE_URL: ${{ needs.surge.outputs.url }}
|
Reference in New Issue
Block a user