Merge pull request #4 from asnowc/feat/debug #29
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: Unit Test | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- test/* | |
- feat/* | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: asnowc/actions@setup-node/v2 | |
with: | |
node_v: 22 | |
pnpm_v: 9 | |
run_install: true | |
- name: Unit test | |
run: pnpm run ci:test | |
- name: Type check | |
run: pnpm run type-check | |
e2e: | |
needs: test | |
if: ${{!startsWith(github.ref_name,'feat/')}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: asnowc/actions@setup-node/v2 | |
with: | |
node_v: 22 | |
pnpm_v: 9 | |
run_install: true | |
- name: Build | |
run: pnpm run -r ci:build | |
- name: Install browser | |
run: pnpm playwright install chromium webkit firefox --with-deps | |
working-directory: ./e2e | |
- name: E2E test | |
continue-on-error: true | |
run: pnpm run ci:e2e | |
id: e2e | |
working-directory: ./e2e | |
- uses: actions/upload-artifact@v4 | |
if: ${{steps.e2e.outcome=='failure'}} | |
with: | |
name: playwright-report | |
path: e2e/playwright-report/ | |
- name: Result | |
if: ${{steps.e2e.outcome=='failure'}} | |
run: exit |