-
Notifications
You must be signed in to change notification settings - Fork 384
50 lines (49 loc) · 1.51 KB
/
pr.yaml
File metadata and controls
50 lines (49 loc) · 1.51 KB
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
name: pr
on: [ pull_request ]
permissions:
contents: read
env:
TESTCONTAINERS_RYUK_DISABLED: true
jobs:
semgrep:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
steps:
# Retrieve the source code for the repository
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# Fetch the semgrep rules
- run: git clone https://github.com/dgryski/semgrep-go.git
# Run the rule checker using the fetched rules
- run: semgrep ci -f semgrep-go
check-race:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
# https://www.npmjs.com/package/semver#caret-ranges-123-025-004
go-version: "^1.23"
check-latest: true
- run: go version
- run: make deps
- run: make check-race
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
# https://www.npmjs.com/package/semver#caret-ranges-123-025-004
go-version: "^1.23"
check-latest: true
- run: go version
- run: make deps
- run: |
: Check format
make fmt
git diff --exit-code
- run: make vet
- run: make staticcheck
- run: make shortcheck