-
Notifications
You must be signed in to change notification settings - Fork 36
63 lines (52 loc) · 1.68 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
checks:
name: Project Checks
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/bucketbench
fetch-depth: 25
- name: Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
skip-cache: true
working-directory: src/github.com/estesp/bucketbench
- name: Install dependencies
run: go install github.com/vbatts/git-validation@latest
- name: DCO
env:
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
DCO_VERBOSITY: "-q"
DCO_RANGE: ""
working-directory: src/github.com/estesp/bucketbench
run: |
if [ -z "${GITHUB_COMMIT_URL}" ]; then
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH})
else
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
fi
GIT_CHECK_EXCLUDE="./vendor" git-validation -range "${DCO_RANGE}" -run DCO,short-subject,dangling-whitespace
- name: Vendor Check
working-directory: src/github.com/estesp/bucketbench
run: ./hack/vendor.sh
- name: Test Build
run: |
make binary
working-directory: src/github.com/estesp/bucketbench