fix(diff): resolve commit parent to full SHA for markdown-diff tools … #142
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] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # git-flow is required for the Git Flow integration tests | |
| # (submodule-lfs-flow.integration.test.ts). Without it those tests | |
| # auto-skip via describe.skipIf — installing it ensures full coverage | |
| # of the flow* methods on CI. | |
| - name: Install git-flow | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends git-flow | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| cache-dependency-path: | | |
| package-lock.json | |
| webview-ui/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install webview dependencies | |
| run: cd webview-ui && npm ci | |
| - name: Type check (extension) | |
| run: npm run lint | |
| - name: Type check (webview) | |
| run: cd webview-ui && npm run check | |
| - name: Run tests with coverage | |
| run: npx vitest run --coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.node-version == 22 | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage/lcov.info | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # Codecov Test Analytics — flaky detection, slow-test ranking, failure | |
| # history. `if: always()` so failed runs still upload (the failures are | |
| # the most interesting data points). | |
| - name: Upload test results to Codecov | |
| if: always() && matrix.node-version == 22 | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| files: ./test-results.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Build extension | |
| run: npm run build:extension | |
| - name: Build webview | |
| run: npm run build:webview |