-
-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (38 loc) · 1.31 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
on: [push, pull_request]
name: Test
jobs:
test:
runs-on: "ubuntu-latest"
strategy:
matrix:
go-version: [1.18.x]
# os: [ubuntu-latest, macos-latest, windows-latest]
# runs-on: ${{ matrix.os }}
steps:
- name: Set Golang shared lib directory for GH Actions
run: |
echo "LD_LIBRARY_PATH=/tmp" >> $GITHUB_ENV
echo "PACT_GO_LIB_DOWNLOAD_PATH=/tmp" >> $GITHUB_ENV
echo "LOG_LEVEL=trace" >> $GITHUB_ENV
echo "GITHUB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.5
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make
env:
PACT_BROKER_TOKEN: "${{ secrets.PACTFLOW_PACT_BROKER_TOKEN }}"
PACT_BROKER_BASE_URL: "${{ secrets.PACTFLOW_PACT_BROKER_BASE_URL }}"
ACCEPTANCE_PACT_BROKER_TOKEN: "${{ secrets.ACCEPTANCE_PACT_BROKER_TOKEN }}"
ACCEPTANCE_PACT_BROKER_BASE_URL: "${{ secrets.ACCEPTANCE_PACT_BROKER_BASE_URL }}"
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs
path: acceptance/**/log/*.log