feat: auto-sync plugin.json and marketplace.json versions on release #49
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] | |
| paths: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig.json' | |
| - 'eslint.config.js' | |
| - 'vitest.config.ts' | |
| - '.github/workflows/ci.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig.json' | |
| - 'eslint.config.js' | |
| - 'vitest.config.ts' | |
| - '.github/workflows/ci.yml' | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Test (${{ matrix.os }}, Node ${{ matrix.node-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node-version: [24] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Lint | |
| run: npm run lint | |
| - name: Test (with coverage) | |
| run: npm run test -- --coverage | |
| - name: Upload coverage | |
| if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| smoke-test: | |
| name: Smoke test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: quality | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Node 24 | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Verify binary runs (Unix) | |
| if: runner.os != 'Windows' | |
| run: node dist/index.js --version | |
| - name: Verify binary runs (Windows) | |
| if: runner.os == 'Windows' | |
| run: node dist/index.js --version | |
| shell: pwsh | |
| - name: Verify config file path resolves correctly | |
| run: node --input-type=module -e "import { getConfigPath } from './dist/utils/paths.js'; console.log(getConfigPath()); process.exit(0);" | |
| benchmark: | |
| name: Cache Hit Rate Benchmarks | |
| runs-on: ubuntu-latest | |
| needs: quality | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Node 24 | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Run benchmarks | |
| run: npm run benchmark -- --reporter=json --output=benchmark-results.json | |
| - name: Comment benchmark results on PR | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const results = JSON.parse(fs.readFileSync('benchmark-results.json', 'utf8')); | |
| const body = [ | |
| '## Cache Hit Rate Benchmarks', | |
| '', | |
| '| Session type | Hit rate | Threshold | Status |', | |
| '|---|---|---|---|', | |
| ...results.map(r => { | |
| const pass = r.hitRate >= r.threshold; | |
| return `| ${r.name} | ${(r.hitRate * 100).toFixed(1)}% | ${(r.threshold * 100).toFixed(0)}% | ${pass ? '✅' : '❌'} |`; | |
| }), | |
| ].join('\n'); | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body, | |
| }); | |
| commit-lint: | |
| name: Conventional Commits | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check commit messages | |
| uses: wagoid/commitlint-action@v6 | |
| with: | |
| configFile: commitlint.config.js |