Skip to content

Update GitHub actions #278

Update GitHub actions

Update GitHub actions #278

Workflow file for this run

on:
push:
branches:
- '*.v7'
pull_request:
branches:
- '*.v7'
name: Test v7
jobs:
test:
strategy:
matrix:
go: [stable]
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@v5
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
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/...