-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.37 KB
/
Copy pathci.yml
File metadata and controls
54 lines (44 loc) · 1.37 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
51
52
53
54
name: CI
on: [ pull_request ]
jobs:
test-go:
name: Test implementation in Golang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: ^1.25.1
id: go
- name: Set up Docker Compose
uses: docker/setup-compose-action@v1
- run: cd cmd/mkunion; go get -v -t -d ./...
- run: cd cmd/mkunion; go build -o mkunion
- run: go install github.com/matryer/moq@v0.6.0
- run: go get -v -t -d ./...
# generate code with mkunion
- run: ./cmd/mkunion/mkunion watch -g ./...
- run: pip install awscli-local
- run: dev/bootstrap.sh -nologs
# run tests
- run: |
set -e
retries=3
until [ $retries -le 0 ]; do
if go test -v ./...; then
break
fi
echo "Retrying Go tests ($retries retries left)..."
retries=$((retries - 1))
done
if [ $retries -eq 0 ]; then
echo "Go tests failed after all retries."
exit 1
fi
- run: |
go test -race -coverprofile=coverage.out -covermode=atomic ./... || true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: widmogrod/mkunion