Feature/3.0 conditional flow #222
This file contains hidden or 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: 'Haibun unit tests' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| # This allows a subsequently queued workflow run to interrupt previous runs | |
| concurrency: | |
| group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| unit_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| # Optional: Caching npm dependencies can speed up your builds | |
| cache: 'npm' | |
| - name: Install main deps | |
| run: npm ci | |
| - name: Install Playwright browsers and dependencies | |
| run: npx playwright install --with-deps | |
| - name: build | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test | |
| - name: Run e2e tests | |
| run: | | |
| cd e2e-tests | |
| npm ci | |
| npm test |