-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (42 loc) · 950 Bytes
/
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
# Run redis so we can integration test the rate limiter
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Build
run: script/build
- name: Test
run: script/test
lint:
name: Lint
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false # for this job we rely on golangci-lint-action's cache
- name: Lint (other)
run: script/lint
- name: Lint (golangci-lint)
uses: golangci/golangci-lint-action@v4
with:
version: v1.55.2