-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
4 changed files
with
89 additions
and
29 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 |
---|---|---|
@@ -1,29 +1,74 @@ | ||
name: test | ||
name: ginkgo | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
mod: | ||
runs-on: ubuntu-latest | ||
name: Check modules | ||
steps: | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
id: vars | ||
run: | | ||
echo ::set-output name=go_version::$(cat go.mod | head -3 | tail -1 | cut -d ' ' -f 2) | ||
echo "Using Go version ${{ steps.vars.outputs.go_version }}" | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
fetch-depth: 2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
go-version: ${{ steps.vars.outputs.go_version }} | ||
files: | | ||
go.* | ||
**/*.go | ||
- name: Verify Go Modules Setup | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go mod verify | ||
|
||
- run: go mod tidy && git diff --exit-code go.mod go.sum | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
go.* | ||
**/*.go | ||
- run: go vet ./... | ||
|
||
- name: Install ginkgo | ||
run: | | ||
go get github.com/onsi/ginkgo/v2/ginkgo | ||
go get github.com/onsi/gomega/... | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go get github.com/onsi/ginkgo/v2/ginkgo | ||
|
||
- name: Print out Ginkgo version | ||
run: ginkgo version | ||
- run: ginkgo -r --randomize-all --randomize-suites --race --trace -cover | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go run github.com/onsi/ginkgo/v2/ginkgo version | ||
|
||
- name: Launch tests | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go run github.com/onsi/ginkgo/v2/ginkgo -r --randomize-all --randomize-suites --race --trace -cover |
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,16 +1,36 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
go.* | ||
**/*.go | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.52.2 | ||
version: v1.52.2 |
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 |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
"noctx", | ||
"nolintlint", | ||
"nxdumptool", | ||
"onsi", | ||
"prealloc", | ||
"renameio", | ||
"robustio", | ||
|