-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (45 loc) · 1.14 KB
/
build.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
53
name: Go Build & Test
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: Build & Test
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Get dependencies
run: |
go mod download
go version
go build
- name: GolangCI-Lint
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --verbose
- uses: awalsh128/cache-apt-pkgs-action@latest
if: runner.os == 'Linux'
with:
packages: etcd ncat
version: 1.0
- name: Test E2E
if: runner.os == 'Linux'
run: |
sudo test/behaviour_test.sh
sudo rm -r default.etcd || true
- name: Run GoReleaser
if: runner.os == 'Linux'
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --snapshot --skip=publish --clean