-
Notifications
You must be signed in to change notification settings - Fork 0
Establish continuous integration workflows #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bb6a8de
github: test the module across Go versions
danielorbach feda859
github: enforce code quality standards with golangci-lint
danielorbach 250241d
github: scan for known Go vulnerabilities
danielorbach 5776eb5
github: run CI on a weekly schedule and manual dispatch
danielorbach e74421e
docs: display CI status badge in README
danielorbach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Continuous Integration Workflow | ||
| # | ||
| # Validates code quality and correctness on every pull request and push to | ||
| # main. | ||
| # | ||
| # The test job runs the test suite across multiple Go versions (stable and | ||
| # oldstable) with race detection enabled to catch concurrency issues. | ||
| # | ||
| # The lint job performs automated code quality checks using golangci-lint to | ||
| # catch common issues and style violations. | ||
|
|
||
| name: "🚦 Integration" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: "0 9 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| name: "🧪 Testing" | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| go-version: [stable, oldstable] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
|
|
||
| - name: Download dependencies | ||
| run: go mod download | ||
|
|
||
| - name: Build | ||
| run: go build ./... | ||
|
|
||
| - name: Test | ||
| run: go test -v -race ./... | ||
|
|
||
| lint: | ||
| name: "🌡️ Linting" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: stable | ||
|
|
||
| - name: Run golangci-lint | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| version: latest | ||
|
|
||
| govulncheck: | ||
| name: "🛡️ Vulnerability Scanning" | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| steps: | ||
| - name: Run govulncheck | ||
| uses: golang/govulncheck-action@v1 | ||
| with: | ||
| go-version-input: stable | ||
| output-format: sarif | ||
| output-file: results.sarif | ||
|
danielorbach marked this conversation as resolved.
|
||
|
|
||
| - name: Upload SARIF to Code Scanning | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: results.sarif | ||
| category: govulncheck | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Golangci-lint Configuration | ||
| # | ||
| # Golangci-lint can be used with zero configuration, relying on sensible | ||
| # defaults. This file exists as a signal to future maintainers that linting | ||
| # is part of the development workflow. | ||
| # | ||
| # When configuration becomes necessary, consult these resources: | ||
| # | ||
| # Configuration File Reference (includes link to latest full reference file): | ||
| # <https://golangci-lint.run/docs/configuration/file> | ||
| # | ||
| # Available Linters (click any linter to see its specific configuration): | ||
| # <https://golangci-lint.run/docs/linters> | ||
|
|
||
| version: "2" |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.