-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ed Warnicke <[email protected]>
- Loading branch information
1 parent
df36de1
commit 38643af
Showing
5 changed files
with
25 additions
and
90 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -8,99 +8,40 @@ jobs: | |
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
- name: Install yamllint | ||
run: pip install --user yamllint | ||
- name: Run yamllint | ||
run: ~/.local/bin/yamllint -c .yamllint.yml --strict . | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- run: | | ||
go build -race ./... | ||
build-win: | ||
name: build-win | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
- name: yaml-lint | ||
uses: ibiqlik/action-yamllint@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- run: | | ||
go build -race ./... | ||
build-osx: | ||
name: build-osx | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- run: | | ||
go build -race ./... | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- name: Install gotestsum | ||
run: go get gotest.tools/[email protected] | ||
- name: Run tests | ||
run: | | ||
eval $(go env) | ||
mkdir -p ~/junit/ | ||
${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -race -short $(go list ./...) | ||
test-win: | ||
name: test-win | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- name: Install gotestsum | ||
run: go get gotest.tools/[email protected] | ||
- name: Run tests | ||
run: | | ||
$env:Path += ";$(go env GOPATH)\bin" | ||
mkdir $home/junit | ||
gotestsum --junitfile $home\junit\unit-tests.xml -- -race -short $(go list .\...) | ||
test-osx: | ||
name: test-osx | ||
runs-on: macos-latest | ||
config_file: .ci/yamllint.yml | ||
strict: true | ||
build-and-test: | ||
name: build and test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- name: Install gotestsum | ||
run: go get gotest.tools/[email protected] | ||
- name: Run tests | ||
run: | | ||
eval $(go env) | ||
mkdir -p ~/junit/ | ||
${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -race -short $(go list ./...) | ||
- name: Build | ||
run: go build -race ./... | ||
- name: Test | ||
run: go test -race ./... | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
env: | ||
GOLANGCI_LINT_CONTAINER: golangci/golangci-lint:v1.28.1 | ||
GOLANGCI_LINT_CONTAINER: golangci/golangci-lint:v1.23.2 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: Pull golangci-lint docker container | ||
run: docker pull ${GOLANGCI_LINT_CONTAINER} | ||
- name: Run golangci-lint | ||
run: docker run --rm -v $(pwd):/app -w /app ${GOLANGCI_LINT_CONTAINER} golangci-lint run | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.31 | ||
|
||
excludeFmtErrorf: | ||
name: exclude fmt.Errorf | ||
|
@@ -173,17 +114,11 @@ jobs: | |
run: | | ||
grep ^replace go.mod || exit 0 | ||
exit 1 | ||
captureRunEnv: | ||
name: Capture CI Run Env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: printenv | ||
automerge: | ||
name: automerge | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
- test | ||
- build-and-test | ||
if: github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request' | ||
steps: | ||
- name: Check out the code | ||
|
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