ci: test win - SKIP_PLUGIN_AVRO #100
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request, workflow_dispatch] | |
name: Test | |
env: | |
PACT_BROKER_BASE_URL: https://testdemo.pactflow.io | |
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} | |
APP_SHA: ${{ github.sha }} | |
APP_REF: ${{ github.ref }} | |
LD_LIBRARY_PATH: /tmp | |
PACT_GO_LIB_DOWNLOAD_PATH: /tmp | |
LOG_LEVEL: info | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [ # https://endoflife.date/go | |
# 1.17.x, # Ended 02 Aug 2022 | |
# 1.18.x, # Ended 01 Feb 2023 | |
# 1.19.x, # Ended 8 Aug 2023 | |
'1.20', # Ended 06 Feb 2024 | |
'1.21', | |
'1.22' | |
] | |
os: [ | |
# ubuntu-22.04, | |
# ubuntu-latest, | |
windows-latest, | |
# macos-12, | |
# macos-14 | |
] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
if: matrix.os != 'ubuntu-22.04' | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/setup-java@v4 # Needed for the Avro example | |
if: matrix.os != 'ubuntu-22.04' | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set SKIP_PLUGIN_AVRO for Windows | |
if: matrix.os == 'windows-latest' | |
run: echo "SKIP_PLUGIN_AVRO=true" >> $GITHUB_ENV | |
shell: bash | |
# TODO - work out why plugin wont start on windows | |
- run: brew install protobuf | |
if: matrix.os == 'macos-14' | |
- name: Unit Test | |
if: matrix.os != 'ubuntu-22.04' | |
run: make ci_unit | |
- name: Set up QEMU | |
if: matrix.os == 'ubuntu-22.04' | |
uses: docker/setup-qemu-action@v3 | |
- name: Build arm64 dockerfile | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
docker build \ | |
--platform linux/arm64 \ | |
--build-arg VERSION=${{ matrix.go-version }} \ | |
-f Dockerfile-deb \ | |
-t pactfoundation/pact-go-test-${{ matrix.go-version }} . | |
- name: Unit Test (arm64 docker) | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
docker run \ | |
--platform linux/arm64 \ | |
-e SKIP_RACE=true \ | |
--rm pactfoundation/pact-go-test-${{ matrix.go-version }} | |
- name: Examples with Standalone (arm64 docker) | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
docker run \ | |
--platform linux/arm64 \ | |
-e PACT_BROKER_BASE_URL \ | |
-e PACT_BROKER_TOKEN \ | |
-e LOG_LEVEL \ | |
-e APP_SHA \ | |
-e APP_BRANCH=${APP_REF:11} \ | |
-e SKIP_RACE=true \ | |
--rm \ | |
pactfoundation/pact-go-test-${{ matrix.go-version }} \ | |
/bin/sh -c "make download_plugins && make install-pact-ruby-cli && PACT_TOOL=ruby make pact" | |
# - name: Examples with Docker | |
# if: runner.os == 'Linux' | |
# run: APP_BRANCH=${APP_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" make ci_examples | |
- name: Examples with Standalone | |
if: matrix.os != 'ubuntu-22.04' | |
run: | | |
make install-pact-ruby-standalone | |
APP_BRANCH=${APP_REF:11} PACT_TOOL=standalone make ci_hosted_examples | |
- name: Install goveralls | |
run: go install github.com/mattn/goveralls@latest | |
if: runner.os == 'Linux' && matrix.os != 'ubuntu-22.04' | |
- name: Send coverage | |
run: goveralls -coverprofile=coverage.txt -service=github -parallel | |
if: runner.os == 'Linux' && matrix.os != 'ubuntu-22.04' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: logs-${{ github.job }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.go-version }}-${{ matrix.os }}.zip | |
path: ~/.pact/plugins/**/plugin.log | |
if: ${{ always() }} && matrix.os != 'ubuntu-22.04' | |
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 | |
# test-other-os: | |
# strategy: | |
# matrix: | |
# go-version: [ # https://endoflife.date/go | |
# 1.19.x, | |
# 1.20.x, | |
# 1.21.x | |
# ] | |
# os: [macos-latest,windows-latest] | |
# fail-fast: false | |
# runs-on: ${{ matrix.os }} | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# - name: Install Go | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: ${{ matrix.go-version }} | |
# - run: make test | |
# env: | |
# SKIP_PLUGIN_AVRO: true |