Skip to content

Update test-v7.yml #277

Update test-v7.yml

Update test-v7.yml #277

Workflow file for this run

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/...