CP3108 SR AI-powered marking #11670
  
    
      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: Run CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| env: | |
| TZ: Asia/Singapore | |
| NODE_OPTIONS: --max_old_space_size=8192 | |
| GENERATE_SOURCEMAP: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| commands: [tsc, 'format:ci', eslint, build, 'test --bail=1', test-coveralls] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # Has to be run before actions/setup-node. | |
| # See: https://github.com/actions/setup-node/issues/480 | |
| - name: Enable corepack for Yarn | |
| run: corepack enable | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Run command | |
| run: yarn run ${{ matrix.commands }} | |
| - name: Coveralls - Upload test coverage report | |
| if: matrix.commands == 'test-coveralls' | |
| uses: coverallsapp/github-action@master | |
| with: | |
| path-to-lcov: coverage/lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |