-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8326e49
commit e94bd8d
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,58 @@ | ||
name: codeql | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths-ignore: | ||
- '**/*.md' | ||
- '**/*.txt' | ||
- '**/*.yaml' | ||
- '**/*_test.go' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
paths-ignore: | ||
- '**/*.md' | ||
- '**/*.txt' | ||
- '**/*.yaml' | ||
- '**/*_test.go' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: 'ubuntu-latest' | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- go | ||
|
||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
check-latest: true | ||
- | ||
name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- | ||
name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
- | ||
name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains 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,28 @@ | ||
name: Go Test on Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
tests: | ||
name: Run Go Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.21' # Use the version of Go your project requires | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Run Linters" | ||
uses: golangci/golangci-lint-action@latest | ||
with: | ||
version: latest | ||
args: --verbose | ||
|
||
- name: Run tests | ||
run: go test -v ./... |