test: vitest #10
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'] | |
| jobs: | |
| node: | |
| name: Node.js v${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Clean install dependencies | |
| run: npm ci | |
| - name: Build gaman | |
| run: npm run build | |
| - name: Generate GAMAN_KEY | |
| run: npm run gen:key | |
| - name: Run tests | |
| run: npm test | |
| bun: | |
| name: Bun | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| - name: Remove package-lock.json | |
| run: rm -f package-lock.json | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build gaman | |
| run: bun run build | |
| - name: Generate GAMAN_KEY | |
| run: bun run gen:key | |
| - name: Run tests | |
| run: bun test | |
| bun-windows: | |
| name: Bun Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| - name: Remove package-lock.json (to avoid npm lockfile conflict) | |
| run: Remove-Item package-lock.json -ErrorAction SilentlyContinue | |
| shell: pwsh | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build gaman | |
| run: bun run build | |
| - name: Generate GAMAN_KEY | |
| run: bun run gen:key | |
| - name: Run tests | |
| run: bun test |