Skip to content

Commit 6230ef8

Browse files
committed
Combine golangci-lint and build actions into a single file.
1 parent 05e0341 commit 6230ef8

3 files changed

Lines changed: 39 additions & 38 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/golangci-lint.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: lint and build
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
pull-requests: read
6+
jobs:
7+
golangci:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-go@v3
12+
with:
13+
go-version: stable
14+
check-latest: true
15+
- name: Go module download
16+
run: go mod download
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v3
19+
with:
20+
version: latest
21+
# args: --issues-exit-code=0
22+
only-new-issues: true
23+
build:
24+
needs: golangci
25+
strategy:
26+
matrix:
27+
go-version: ['stable']
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v3
32+
- name: Install Go
33+
uses: actions/setup-go@v3
34+
with:
35+
go-version: ${{ matrix.go-version }}
36+
check-latest: true
37+
cache: true
38+
- name: Build
39+
run: go build

0 commit comments

Comments
 (0)