-
Notifications
You must be signed in to change notification settings - Fork 22
43 lines (34 loc) · 1.17 KB
/
golang.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
name: Go
on:
push:
branches: [ main, release/** ]
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # version v3.0.2
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Setup GO
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f # version v3.3.0
with:
go-version: '>=1.22.1'
- uses: stellar/actions/rust-cache@main
- name: Build libpreflight
run: |
rustup update
make build-libpreflight
- name: Run golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # version v6.0.1
with:
version: v1.59.1 # this is the golangci-lint version
github-token: ${{ secrets.GITHUB_TOKEN }}
only-new-issues: true