-
Notifications
You must be signed in to change notification settings - Fork 932
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions Code Quality and Units workflows
- Loading branch information
Showing
4 changed files
with
152 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,3 @@ | ||
paths-ignore: | ||
- cf | ||
- util/ui/request_logger_terminal_display.go |
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,35 @@ | ||
name: "Code Quality" | ||
|
||
on: | ||
push: | ||
branches: [ master, '*' ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '45 5 * * *' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: go | ||
config-file: ./.github/codeql/codeql-config.yml | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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,113 @@ | ||
name: Units Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Run go fmt | ||
run: go fmt && git diff --exit-code | ||
|
||
units-linux: | ||
name: Units Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Set up Test | ||
run: | | ||
go get -u github.com/onsi/ginkgo/ginkgo | ||
go get github.com/onsi/gomega/matchers@v1.10.5 | ||
- | ||
name: Run Linux Units | ||
run: make units | ||
env: | ||
ACK_GINKGO_RC: true | ||
|
||
units-macos: | ||
name: Units OS X | ||
runs-on: macos-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Set up Test | ||
run: | | ||
go get -u github.com/onsi/ginkgo/ginkgo | ||
go get github.com/onsi/gomega/matchers@v1.10.5 | ||
- | ||
name: Run MacOS Units | ||
run: make units | ||
env: | ||
ACK_GINKGO_RC: true | ||
|
||
units-windows: | ||
name: Units Windows | ||
runs-on: windows-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Set up Test | ||
run: | | ||
go get -u github.com/onsi/ginkgo/ginkgo | ||
go get github.com/onsi/gomega/matchers@v1.10.5 | ||
- | ||
name: Run Windows Units | ||
shell: pwsh | ||
run: > | ||
ginkgo -r -p | ||
-randomizeAllSpecs | ||
-randomizeSuites | ||
-skipPackage integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword | ||
-flakeAttempts=2 | ||
env: | ||
ACK_GINKGO_RC: true |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build go1.13 | ||
// +build go1.13 | ||
|
||
package main | ||
|