[codex] Add GitHub Actions CI #3
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| server: | |
| name: Server lint and unit tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: server | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: server/package-lock.json | |
| - name: Install server dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Run server lint | |
| run: npm run lint | |
| - name: Run server unit tests | |
| run: npm test | |
| client: | |
| name: Client lint and unit tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: client | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 14.21.3 | |
| cache: npm | |
| cache-dependency-path: client/package-lock.json | |
| - name: Install client dependencies | |
| run: npm ci | |
| - name: Run client lint | |
| run: npm run lint | |
| - name: Run client unit tests | |
| run: CI=true npm test -- --watchAll=false --passWithNoTests | |
| cypress: | |
| name: Cypress | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install root dependencies | |
| run: npm ci | |
| - name: Run Cypress | |
| run: npm run cypress:run |