-
Notifications
You must be signed in to change notification settings - Fork 28
80 lines (80 loc) · 2.02 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: ChainStorage CI
on:
push: {}
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: "ci-${{ github.ref_name }}"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.21"
- "1.20"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Setup environment"
uses: ./.github/workflows/setup
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: make build
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.21"
- "1.20"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Setup environment"
uses: ./.github/workflows/setup
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: make test
integration:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.21"
- "1.20"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Setup environment"
uses: ./.github/workflows/setup
with:
go-version: ${{ matrix.go-version }}
- name: Run localstack
shell: bash
run: |
docker compose -f docker-compose-testing.yml up -d --force-recreate
echo "Waiting for localstack to be ready..."
for i in $(seq 1 999); do
if [ "$(curl -s http://localhost:4566/_localstack/health | jq -r '.services.s3')" = "available" ]; then
break
fi
sleep 0.3
if [ $(($i % 30)) -eq 0 ]; then
echo .
fi
done
echo "localstack ready"
- name: Integration Tests
run: ./scripts/gcp-emulators.sh exec make integration
ci-passed:
runs-on: ubuntu-22.04
needs: [build, test, integration]
steps:
- run: echo "All tests passed"