CI #23
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: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| # Run daily at 2 AM UTC to check for new vulnerabilities | |
| - cron: "0 2 * * *" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| go-version: [1.25.x, 1.24.x] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "latest" | |
| cache: "npm" | |
| - name: Install dependencies and build | |
| run: | | |
| npm ci --ignore-scripts | |
| cd test/files && go mod download && go mod tidy | |
| cd ../.. | |
| make | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.7.2 | |
| working-directory: test/files | |
| args: --config ../../.golangci.yml | |
| - name: Run tests | |
| run: make CI_TAGS="--tags=noresinit" test | |
| - name: Run govulncheck | |
| uses: golang/govulncheck-action@v1 | |
| with: | |
| go-version-input: ${{ matrix.go-version }} | |
| work-dir: test/files | |
| - name: Check for uncommitted changes | |
| run: git diff --exit-code |