-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PP-9238: Frontend build post merge to master (#2738)
* PP-9238: Frontend build post merge to master On a post merge to master: - publish the pact - run frontend as consumer pact test Co-authored-by: Jonathan Harden <[email protected]> Co-authored-by: Kat Stevens <[email protected]>
- Loading branch information
1 parent
d342697
commit af49a78
Showing
3 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Post Merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/run-tests.yml | ||
|
||
publish-frontend-consumer-contract-tests: | ||
needs: tests | ||
runs-on: ubuntu-18.04 | ||
|
||
name: Publish and tag frontend consumer pact | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 | ||
- name: Parse Node version | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
id: parse-node-version | ||
- name: Setup | ||
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a | ||
with: | ||
node-version: "${{ steps.parse-node-version.outputs.NVMRC }}" | ||
- name: Cache build directories | ||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed | ||
with: | ||
path: | | ||
node_modules | ||
govuk_modules | ||
public | ||
key: ${{ runner.os }}-build-id-${{ github.head_ref }}-${{ github.sha }} | ||
- name: Cache pacts directory | ||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed | ||
with: | ||
path: pacts | ||
key: ${{ runner.os }}-build-id-${{ github.head_ref }}-${{ github.sha }}-pacts | ||
- name: Publish and tag frontend consumer pact | ||
env: | ||
PACT_BROKER_URL: https://pay-pact-broker.cloudapps.digital | ||
PACT_CONSUMER_VERSION: ${{ github.sha }} | ||
PACT_BROKER_USERNAME: ${{ secrets.pact_broker_username }} | ||
PACT_BROKER_PASSWORD: ${{ secrets.pact_broker_password }} | ||
PACT_CONSUMER_TAG: master | ||
run: npm run publish-pacts | ||
|
||
connector-provider-contract-tests: | ||
needs: publish-frontend-consumer-contract-tests | ||
uses: alphagov/pay-connector/.github/workflows/_run-pact-provider-tests.yml@master | ||
with: | ||
consumer: frontend | ||
consumer_tag: master | ||
secrets: | ||
pact_broker_username: ${{ secrets.pact_broker_username }} | ||
pact_broker_password: ${{ secrets.pact_broker_password }} |
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
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