-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (50 loc) · 1.27 KB
/
ci.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.22.x
- name: Go version
run: go version
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install -y make git
- name: Install dependencies
run: go mod download
- name: Build
run: make
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
report:
name: Report
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.22.x
- name: Install report card
run: |
git clone https://github.com/gojp/goreportcard.git
cd goreportcard
make install
go install ./cmd/goreportcard-cli
cd ..
rm -rf goreportcard
- name: Report
run: goreportcard-cli -v -t 100
report-card:
name: Report Card
runs-on: ubuntu-20.04
steps:
- name: Request Report Update
run: |
curl -X POST -F "repo=github.com/$GITHUB_REPOSITORY" https://goreportcard.com/checks