-
Notifications
You must be signed in to change notification settings - Fork 1.1k
59 lines (51 loc) · 1.43 KB
/
test-v7.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
50
51
52
53
54
55
56
57
58
59
on:
push:
branches:
- '*.v7'
pull_request:
branches:
- '*.v7'
name: Test v7
jobs:
test:
strategy:
matrix:
go: [1.17.x, 1.18.x]
os: [ubuntu-latest]
name: Run ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Prepare tests
run: |
sudo apt-get install -y netcat
sudo sysctl -w vm.max_map_count=262144
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Docker containers
run: docker-compose up -d
- name: Check Docker containers
run: docker ps -a
- name: Get dependencies
run: |
go get -u github.com/google/go-cmp/cmp
go get -u github.com/fortytw2/leaktest
go get . ./aws/... ./config/... ./trace/... ./uritemplates/...
- name: Wait for Elasticsearch
run: |
while ! nc -z localhost 9200; do sleep 1; done
while ! nc -z localhost 9210; do sleep 1; done
- name: Run the tests
run: |
go test -race -deprecations -strict-decoder -v . ./aws/... ./config/... ./trace/... ./uritemplates/...