-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.31 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
55
56
name: Continuous integration
on:
push:
branches:
- 'main'
paths:
- src/**
- .github/workflows/**
- 'aqua.yaml'
pull_request:
paths:
- src/**
- .github/workflows/**
- 'aqua.yaml'
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: aquaproj/aqua-installer@v3.0.1
with:
aqua_version: v2.27.2
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.6'
- name: Setup GoLangCI-Lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s
- name: Show GoLangCI-Lint version
run: ./bin/golangci-lint --version | head -n1
- name: Run GoLangCI-Lint
run: >
github-comment exec --token ${{ secrets.GITHUB_TOKEN }} --
../bin/golangci-lint run
working-directory: ./src
- name: Hide old comment
run: github-comment hide --token ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && github.ref_name != 'main' ) }}
- name: Build
run: go build
working-directory: ./src
- name: Test
run: go test -v ./...
working-directory: ./src