test: fix metrics api test stability (#930)

* use httptest instead of host port binding
* restore matrix and remove artificial delay
* fix metrics api test expect calls
This commit is contained in:
nils måsén 2021-05-25 16:42:11 +02:00 committed by GitHub
parent 61b715abec
commit dec6f84a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 57 deletions

View file

@ -35,6 +35,7 @@ jobs:
platform:
- macos-latest
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
@ -52,26 +53,6 @@ jobs:
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-ubuntu:
name: Test (Ubuntu)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x
- name: Run tests
run: |
go test -v -coverprofile coverage.out -covermode atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest