-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 872 Bytes
/
Copy pathgo.yml
File metadata and controls
34 lines (31 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
go:
name: nnctl
runs-on: ubuntu-latest
defaults:
run:
working-directory: nnctl
env:
GOLANGCI_LINT_VERSION: v2.12.2
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: nnctl/go.mod
cache: true
cache-dependency-path: nnctl/go.mod
- run: go test ./...
- run: go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --config ../.golangci.yml ./...
- run: |
mkdir -p ../bin
go build -o ../bin/nnctl ./cmd/nnctl