deps(actions): bump crate-ci/typos in the github-actions group (#801) #21
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 - PR Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| src: ${{ steps.filter.outputs.src }} | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - '**/*.go' | |
| - Dockerfile.* | |
| - Makefile* | |
| - go.mod | |
| - scripts/** | |
| lint-and-test: | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.src == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Sanity check repo contents | |
| run: ls -la | |
| - name: Create and resolve Go cache volumes | |
| id: go-cache | |
| run: | | |
| docker volume create llm-d-gomodcache | |
| docker volume create llm-d-gobuildcache | |
| echo "mod=$(docker volume inspect llm-d-gomodcache -f '{{.Mountpoint}}')" >> $GITHUB_OUTPUT | |
| echo "build=$(docker volume inspect llm-d-gobuildcache -f '{{.Mountpoint}}')" >> $GITHUB_OUTPUT | |
| - name: Cache Go modules and build cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.go-cache.outputs.mod }} | |
| ${{ steps.go-cache.outputs.build }} | |
| key: go-cache-${{ hashFiles('go.sum') }} | |
| restore-keys: | | |
| go-cache- | |
| - name: Run make lint | |
| run: make lint | |
| - name: Run make build | |
| shell: bash | |
| run: make build | |
| # Restore the baseline saved from the last main push so the compare step | |
| # can diff against it. Missing cache (first PR ever) is not an error; | |
| # compare-coverage.sh reports all components as "new" and exits 0. | |
| - name: Restore main branch coverage baseline | |
| if: github.event_name == 'pull_request' | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: coverage/baseline | |
| key: coverage-main | |
| - name: Run unit tests | |
| shell: bash | |
| run: make test-unit | |
| - name: Compare coverage against main baseline | |
| if: github.event_name == 'pull_request' | |
| continue-on-error: true | |
| shell: bash | |
| run: make coverage-compare BASELINE_DIR=coverage/baseline | |
| # Copy the freshly generated profiles into coverage/baseline so that | |
| # the saved path matches the restored path on future PR runs. | |
| - name: Stage coverage baseline for caching | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| shell: bash | |
| run: | | |
| mkdir -p coverage/baseline | |
| cp coverage/*.out coverage/baseline/ | |
| - name: Save coverage baseline (main branch only) | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: coverage/baseline | |
| key: coverage-main | |
| - name: Run make test-e2e | |
| shell: bash | |
| run: make test-e2e |