forked from pact-foundation/pact-go
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.28 KB
/
test.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
on: [push, pull_request, workflow_dispatch]
name: Test
env:
REACT_APP_API_BASE_URL: http://localhost:8080
APP_SHA: ${{ github.sha }}
APP_BRANCH: ${{ github.ref }}
LD_LIBRARY_PATH: /tmp
PACT_GO_LIB_DOWNLOAD_PATH: /tmp
LOG_LEVEL: trace
GIT_COMMIT: ${{ github.sha }}
GIT_REF: ${{ github.ref }}
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: GIT_BRANCH=${GIT_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" make
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
run: goveralls -coverprofile=coverage.txt -service=github -parallel
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true