unit tests #18
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| bun: | |
| name: Bun (latest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Lint | |
| run: bun run lint | |
| - name: Build p5-analysis | |
| run: bun run --cwd p5-analysis build | |
| - name: Test p5-analysis | |
| run: bun run --cwd p5-analysis test | |
| - name: Build p5-server | |
| run: bun run --cwd p5-server build | |
| - name: Test p5-server | |
| run: bun run --cwd p5-server test | |
| node: | |
| name: Node.js (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [ 'lts/*', 'lts/-1', 'lts/-2' ] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Test & Build p5-analysis | |
| run: | | |
| cd p5-analysis | |
| npm install | |
| npm test | |
| npm run build | |
| - name: Test & Build p5-server (with local p5-analysis) | |
| run: | | |
| cd p5-server | |
| npm install ../p5-analysis | |
| npm test | |
| npm run build |