-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpact-test-message-consumer.yaml
More file actions
74 lines (66 loc) · 1.84 KB
/
pact-test-message-consumer.yaml
File metadata and controls
74 lines (66 loc) · 1.84 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Run Pact Tests For Message Consumer
env:
PACT_BROKER_USER: ${{ secrets.PACT_BROKER_USER }}
PACT_BROKER_PASSWORD: ${{ secrets.PACT_BROKER_PASSWORD }}
PACT_BROKER_URL: ${{ secrets.PACT_BROKER_URL }}
PACT_BROKER_SOURCE_SECRET: ${{ secrets.PACT_BROKER_SOURCE_SECRET }}
GIT_BRANCH: ${{ github.head_ref || github.ref_name }}
CONSUMER_APP_VERSION: ${{ github.sha }}
on:
push:
paths:
- src/**
- package.json
- yarn.lock
- tsconfig.json
- .node-version
- .github/workflows/pact-test-message-consumer.yaml
branches:
- main
pull_request:
paths:
- src/**
- package.json
- yarn.lock
- tsconfig.json
- .node-version
- .github/workflows/pact-test-message-consumer.yaml
branches:
- main
types:
- opened
- reopened
- ready_for_review
- synchronize
workflow_dispatch:
inputs:
gitRef:
description: "Input branch name, commit SHA, or tag"
required: true
type: string
default: main
permissions:
contents: read
jobs:
contract-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # pin@v3
with:
ref: ${{ inputs.gitRef || github.ref }}
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
- name: Run yarn install
run: yarn install --frozen-lockfile
- name: Run Pact Tests for Message Consumers
run: yarn test:pact:consumer
env:
NODE_OPTIONS: "--experimental-vm-modules"
- name: Publish Pact Files
if: github.ref_name == 'main'
run: |
yarn connect:pact:broker
yarn pact:publish:contracts