mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
add go vet and go lint
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
45e299ce91
commit
6217565c89
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
@ -35,35 +35,29 @@ jobs:
|
|||||||
runs-on: ${{ matrix.target.runner }}
|
runs-on: ${{ matrix.target.runner }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.16
|
- name: Set up Go 1.19
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.16.7
|
go-version: 1.19.2
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Set path
|
- name: Set path
|
||||||
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
env:
|
env:
|
||||||
GOPATH: ${{runner.workspace}}
|
GOPATH: ${{runner.workspace}}
|
||||||
|
|
||||||
- name: Get pre-requisites
|
- name: golangci-lint CLI
|
||||||
|
uses: golangci/golangci-lint-action@v3
|
||||||
|
with:
|
||||||
|
version: v1.50.0
|
||||||
|
working-directory: src/cmd/linuxkit
|
||||||
|
args: --verbose --timeout=10m
|
||||||
|
- name: go vet CLI
|
||||||
run: |
|
run: |
|
||||||
go get -u golang.org/x/lint/golint
|
cd src/cmd/linuxkit && go vet ./...
|
||||||
go get -u github.com/gordonklaus/ineffassign
|
|
||||||
env:
|
|
||||||
GOPATH: ${{runner.workspace}}
|
|
||||||
|
|
||||||
# - name: Lint
|
|
||||||
# run: |
|
|
||||||
# make local-check
|
|
||||||
# env:
|
|
||||||
# GOPATH: ${{runner.workspace}}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
make GOARCH=${{matrix.target.arch}} GOOS=${{matrix.target.os}} LOCAL_TARGET=$(pwd)/bin/linuxkit-${{matrix.target.suffix}} local-build
|
make GOARCH=${{matrix.target.arch}} GOOS=${{matrix.target.os}} LOCAL_TARGET=$(pwd)/bin/linuxkit-${{matrix.target.suffix}} local-build
|
||||||
@ -99,9 +93,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Set up binfmt
|
- name: Set up binfmt
|
||||||
# Only register arm64 as we are on amd64 already. s390x is not reliable
|
# Only register arm64 as we are on amd64 already. s390x is not reliable
|
||||||
@ -138,9 +130,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Install Pre-Requisites
|
- name: Install Pre-Requisites
|
||||||
run: |
|
run: |
|
||||||
@ -194,9 +184,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Install Pre-Requisites
|
- name: Install Pre-Requisites
|
||||||
run: |
|
run: |
|
||||||
@ -242,9 +230,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Install Pre-Requisites
|
- name: Install Pre-Requisites
|
||||||
run: |
|
run: |
|
||||||
@ -290,9 +276,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Install Pre-Requisites
|
- name: Install Pre-Requisites
|
||||||
run: |
|
run: |
|
||||||
@ -338,9 +322,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Install Pre-Requisites
|
- name: Install Pre-Requisites
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@ -14,9 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
- name: Ensure bin/ directory
|
- name: Ensure bin/ directory
|
||||||
run: mkdir -p bin
|
run: mkdir -p bin
|
||||||
- name: Download linuxkit
|
- name: Download linuxkit
|
||||||
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -11,16 +11,14 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.16
|
- name: Set up Go 1.19
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.16.7
|
go-version: 1.19.2
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
|
||||||
|
|
||||||
- name: Set path
|
- name: Set path
|
||||||
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user