de-duplicate values before fetching #21
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: | |
| checks: | |
| name: Lint & Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run checks | |
| run: npm run checks | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Cache PocketBase | |
| id: cache-pocketbase | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/bin/pocketbase | |
| key: pocketbase-v0.26.3-linux-amd64 | |
| - name: Install PocketBase | |
| if: steps.cache-pocketbase.outputs.cache-hit != 'true' | |
| run: | | |
| wget https://github.com/pocketbase/pocketbase/releases/download/v0.26.3/pocketbase_0.26.3_linux_amd64.zip | |
| unzip pocketbase_0.26.3_linux_amd64.zip pocketbase | |
| chmod +x pocketbase | |
| mkdir -p ~/.local/bin | |
| mv pocketbase ~/.local/bin/ | |
| - name: Add PocketBase to PATH | |
| run: | | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| chmod +x ~/.local/bin/pocketbase | |
| - name: configure test environment vars | |
| run: cp .env.sample .env | |
| - name: Run tests | |
| run: npm test |