mirror of
https://github.com/opencontainers/runtime-spec.git
synced 2026-02-05 09:45:57 +01:00
Switch Go linting to use golangci-lint
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
This commit is contained in:
20
.github/workflows/build-pr.yml
vendored
20
.github/workflows/build-pr.yml
vendored
@@ -11,22 +11,32 @@ jobs:
|
||||
steps:
|
||||
- name: checkout source code
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: setup go environment
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.17.2'
|
||||
|
||||
- name: create go.mod
|
||||
run: |
|
||||
# Fix for "cannot find main module" issue
|
||||
go mod init github.com/opencontainers/runtime-spec
|
||||
|
||||
go get -d ./schema/...
|
||||
|
||||
- name: run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51.2
|
||||
args: --verbose
|
||||
|
||||
- name: run tests
|
||||
run: |
|
||||
export PATH="$(go env GOPATH)/bin:${PATH}"
|
||||
set -x
|
||||
make install.tools
|
||||
|
||||
# Fix for "cannot find main module" issue
|
||||
go mod init github.com/opencontainers/runtime-spec
|
||||
|
||||
go get -d ./schema/...
|
||||
make .govet
|
||||
make .golint
|
||||
|
||||
make .gitvalidation
|
||||
make docs
|
||||
|
||||
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -11,22 +11,32 @@ jobs:
|
||||
steps:
|
||||
- name: checkout source code
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: setup go environment
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.17.2'
|
||||
|
||||
- name: create go.mod
|
||||
run: |
|
||||
# Fix for "cannot find main module" issue
|
||||
go mod init github.com/opencontainers/runtime-spec
|
||||
|
||||
go get -d ./schema/...
|
||||
|
||||
- name: run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51.2
|
||||
args: --verbose
|
||||
|
||||
- name: run tests
|
||||
run: |
|
||||
export PATH="$(go env GOPATH)/bin:${PATH}"
|
||||
set -x
|
||||
make install.tools
|
||||
|
||||
# Fix for "cannot find main module" issue
|
||||
go mod init github.com/opencontainers/runtime-spec
|
||||
|
||||
go get -d ./schema/...
|
||||
make .govet
|
||||
make .golint
|
||||
|
||||
make .gitvalidation
|
||||
make docs
|
||||
|
||||
Reference in New Issue
Block a user