chore(deps): update dependency @graphql-codegen/cli to v6.0.1 #10
Workflow file for this run
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 - Node.js | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'prod-**' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }} | |
| cancel-in-progress: ${{ !contains(github.ref, 'main') && !contains(github.ref, 'prod-') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Check number of lockfiles | |
| run: | | |
| if [ $(find . -name 'package-lock.json' | grep -vc -e 'node_modules') -gt 0 ] | |
| then | |
| echo -e 'Error: found package-lock files in the repository.\nWe use pnpm workspaces to manage packages so all dependencies should be added via pnpm add' | |
| exit 1 | |
| fi | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Check formatting | |
| run: | | |
| pnpm format:check || [ $? -eq 1 ] && printf "\nTip: Run 'pnpm run format' in your terminal to fix this.\n\n" | |
| - name: Lint | |
| run: pnpm lint | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-22.04 | |
| needs: lint | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Fetch curriculum data | |
| run: pnpm fetch-data | |
| - name: Generate GraphQL types | |
| run: pnpm codegen | |
| - name: Type check | |
| run: pnpm type-check | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| needs: type-check | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Fetch curriculum data | |
| run: pnpm fetch-data | |
| - name: Build project | |
| run: pnpm build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: dist | |
| path: packages/server/dist | |
| retention-days: 7 | |
| test: | |
| name: Test | |
| runs-on: ubuntu-22.04 | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Fetch curriculum data | |
| run: pnpm fetch-data | |
| - name: Run tests | |
| run: pnpm test | |
| test-coverage: | |
| name: Test Coverage | |
| runs-on: ubuntu-22.04 | |
| needs: test | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Fetch curriculum data | |
| run: pnpm fetch-data | |
| - name: Run tests with coverage | |
| run: pnpm test:coverage | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| if: always() | |
| with: | |
| files: ./coverage/coverage-final.json | |
| flags: unittests | |
| name: codecov-curriculum-db |