-
Notifications
You must be signed in to change notification settings - Fork 1
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
8902063
commit ffbdfca
Showing
7 changed files
with
59 additions
and
186 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,21 @@ | ||
name: Run CodeQL | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- "*" | ||
schedule: | ||
- cron: "00 13 * * 1" | ||
|
||
workflow_dispatch: {} | ||
|
||
jobs: | ||
codeql: | ||
permissions: | ||
actions: write | ||
contents: read | ||
security-events: write | ||
uses: capnspacehook/go-workflows/.github/workflows/codeql.yml@master |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -11,78 +11,7 @@ on: | |
workflow_dispatch: {} | ||
|
||
jobs: | ||
check-mod-tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
|
||
- name: Ensure go.mod was tidied | ||
run: | | ||
go mod tidy -compat ${{ env.GO_VERSION }} | ||
STATUS=$(git status --porcelain go.mod go.sum) | ||
if [ -n "$STATUS" ]; then | ||
echo "Running go mod tidy modified go.mod and/or go.sum" | ||
exit 1 | ||
fi | ||
exit 0 | ||
staticcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
|
||
- name: Lint with staticcheck | ||
uses: dominikh/[email protected] | ||
with: | ||
install-go: false | ||
|
||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
lint-go: | ||
permissions: | ||
pull-requests: read | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
|
||
- name: Lint with golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
only-new-issues: true | ||
contents: read | ||
uses: capnspacehook/go-workflows/.github/workflows/lint-go.yml@master |
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
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 |
---|---|---|
|
@@ -13,21 +13,18 @@ on: | |
jobs: | ||
race-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
uses: WillAbides/setup-go[email protected] | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
go-version-file: go.mod | ||
|
||
- name: Cache Go files | ||
uses: capnspacehook/cache-go@v1 | ||
|
||
- name: Ensure main package builds | ||
run: | | ||
|
@@ -41,21 +38,18 @@ jobs: | |
binary-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
uses: WillAbides/setup-go[email protected] | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
go-version-file: go.mod | ||
|
||
- name: Cache Go files | ||
uses: capnspacehook/cache-go@v1 | ||
|
||
# run the same tests as above but use a binary to process packets | ||
# to test with landlock and seccomp filters active | ||
|
@@ -68,21 +62,18 @@ jobs: | |
fuzz: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Export constant environmental variables | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .github/workflows/constants.env | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
uses: WillAbides/setup-go[email protected] | ||
with: | ||
go-version: ${{ env.GO_VERSION }}.x | ||
check-latest: true | ||
cache: true | ||
go-version-file: go.mod | ||
|
||
- name: Cache Go files | ||
uses: capnspacehook/cache-go@v1 | ||
|
||
- run: | | ||
go test -fuzz Fuzz -run Config -fuzztime 10m |
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