-
Notifications
You must be signed in to change notification settings - Fork 48
56 lines (54 loc) · 1.7 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
46
47
48
49
50
51
52
53
54
55
56
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"
# Publish to old and new account until we can disable the old account
- run: |
rm -rf spec/pacts/*
bundle exec rspec spec/service_providers/
VERBOSE=true bundle exec rake pact:publish:pactflow_oss
VERBOSE=true bundle exec rake pact:publish:pactflow_pact_foundation
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 }}