-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.18 KB
/
on-pull-request.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
name: On pull request
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: read
env:
# TODO: Switch me out
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
steps:
- name: Setup DynamoDB Local
uses: rrainn/[email protected]
with:
port: 8000
cors: '*'
- name: Setup repo
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Install devtools
run: make install-devtools
- name: Lint
run: make lint
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
skip-pkg-cache: true
# If there are any diffs from goimports or go mod tidy, fail.
- name: Verify no changes from goimports and go mod tidy
run: |
if [ -n "$(git status --porcelain)" ]; then
git diff
exit 1
fi
- name: Build
run: make build
- name: Run test
run: make test