-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify CI. * whitespace
- Loading branch information
Showing
4 changed files
with
66 additions
and
74 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
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,58 +1,98 @@ | ||
name: Go Test | ||
name: Go CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
GO_VERSION: 1.18 | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.45 | ||
|
||
go_mod_tidy_check: | ||
name: Go Mod Tidy Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- run: go mod tidy | ||
|
||
- name: check for diff | ||
run: git diff --exit-code | ||
|
||
test_coverage: | ||
name: Unit Tests Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ["1.18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Test & Coverage | ||
run: | | ||
go install github.com/ory/[email protected] | ||
go-acc -o coverage.txt `go list ./... | grep -v node/tests` -- -v | ||
- uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.txt | ||
|
||
unit_race_test: | ||
name: Run Unit Tests with Race Detector | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ["1.18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: execute test run | ||
run: make test-unit-race | ||
|
||
integration_test: | ||
name: Run Integration Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ["1.18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Swamp Tests | ||
run: make test-swamp | ||
|
||
- name: Swamp Tests with Race Detector | ||
run: make test-swamp-race |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.