-
Notifications
You must be signed in to change notification settings - Fork 24
49 lines (48 loc) · 1.11 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
name: CI
on:
pull_request:
push:
branches:
- master
env:
# These dummy credentials are necessary for running tests against
# localstack s3 service
AWS_ACCESS_KEY_ID: foo
AWS_SECRET_ACCESS_KEY: bar
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go_version:
- '1.15'
- '1.16'
- '1.17'
- '1.18'
- '1.19'
- '1.20'
- '1.21'
- '1.22'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
- name: Go vet
run: go vet ./...
- name: Test
run: |
# Start mock s3 service
make s3-bg
while ! curl http://localhost:4572; do sleep 1; done
sleep 5
# Set up fixture S3 files
make fixture
make cover # run test with coverage
env:
AWS_REGION: ap-northeast-1 # for awscli
- uses: codecov/codecov-action@v4
with:
file: ./cover.out
token: ${{ secrets.CODECOV_TOKEN }}