feat: publish provider contracts using the new all-in-one endpoint #299
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
name: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby_version: ["2.7", "3.0", "3.1", "3.2"] | |
os: ["ubuntu-latest","windows-latest","macos-latest"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby_version }} | |
- run: "bundle install" | |
- run: "bundle exec rake" | |
pact: | |
runs-on: "ubuntu-latest" | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
feature: [""] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
- run: "bundle install" | |
- run: | | |
rm -rf spec/pacts/* | |
bundle exec rspec spec/service_providers/ | |
VERBOSE=true bundle exec rake pact:publish:pactflow | |
env: | |
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }} | |
PACT_BROKER_FEATURES: ${{ matrix.feature }} | |
TEST_FEATURE: ${{ matrix.feature }} | |
can-i-deploy: | |
runs-on: "ubuntu-latest" | |
needs: pact | |
steps: | |
- run: | | |
docker run --rm \ | |
-e PACT_BROKER_BASE_URL=https://pact-oss.pactflow.io \ | |
-e PACT_BROKER_TOKEN \ | |
pactfoundation/pact-cli:latest \ | |
broker can-i-deploy \ | |
--pacticipant "Pact Broker Client" --version ${GITHUB_SHA} \ | |
--pacticipant "Pact Broker" --latest master | |
env: | |
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }} |