feat: annotate automatic tools and exclude from fluency scoring (#529) #1444
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20.x, 22.x, 24.x] | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: vscode-extension/package-lock.json | |
| - name: Install dependencies | |
| working-directory: vscode-extension | |
| run: npm ci | |
| - name: Validate JSON files | |
| working-directory: vscode-extension | |
| run: npm run lint:json | |
| - name: Run linting | |
| working-directory: vscode-extension | |
| run: npm run lint | |
| - name: Run type checking | |
| working-directory: vscode-extension | |
| run: npm run check-types | |
| - name: Compile extension | |
| working-directory: vscode-extension | |
| run: npm run compile | |
| - name: Package extension | |
| working-directory: vscode-extension | |
| run: npm run package | |
| - name: Compile tests | |
| working-directory: vscode-extension | |
| run: npm run compile-tests | |
| - name: Run Node.js unit tests | |
| working-directory: vscode-extension | |
| run: node --require ./out/test/unit/vscode-shim-register.js --test out/test/unit/*.test.js | |
| - name: Run tests | |
| uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1 | |
| with: | |
| run: cd vscode-extension && npm test | |
| options: -screen 0 1024x768x24 | |
| continue-on-error: true # VS Code extension tests can be flaky in CI | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| if: matrix.node-version == '20.x' | |
| with: | |
| name: extension-build | |
| path: | | |
| vscode-extension/dist/ | |
| vscode-extension/out/ | |
| retention-days: 7 | |
| package: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| cache-dependency-path: vscode-extension/package-lock.json | |
| - name: Install dependencies | |
| working-directory: vscode-extension | |
| run: npm ci | |
| - name: Package extension | |
| working-directory: vscode-extension | |
| run: npm run package | |
| - name: Create VSIX package | |
| working-directory: vscode-extension | |
| run: npx vsce package | |
| - name: Upload VSIX package | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: vsix-package | |
| path: 'vscode-extension/*.vsix' | |
| retention-days: 30 |