-
Notifications
You must be signed in to change notification settings - Fork 24
44 lines (43 loc) · 1001 Bytes
/
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
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:
matrix:
go_version:
- 1.15
- 1.16
- 1.17
- 1.18
- 1.19
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
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@v3
with:
file: ./cover.out