forked from lightninglabs/lndmon
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.27 KB
/
main.yml
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
name: CI
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
defaults:
run:
shell: bash
env:
# go needs absolute directories, using the $HOME variable doesn't work here.
GOCACHE: /home/runner/work/go/pkg/build
GOPATH: /home/runner/work/go
GO_VERSION: 1.21.6
jobs:
########################
# lint and build code
########################
lint:
name: lint and build code
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2
- name: go cache
uses: actions/cache@v1
with:
path: /home/runner/work/go
key: lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lndmon-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: lint
run: make lint
- name: build
run: make build