-
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-12573 Run pacts on PRs with GitHub actions
- Runs pact tests on PRs with GitHub actions and uses reusable workflows in pay-ci
- Loading branch information
Showing
4 changed files
with
75 additions
and
186 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,59 @@ | ||
name: Github Actions Tests | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
pact_broker_username: | ||
required: true | ||
pact_broker_password: | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
detect-secrets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
- name: Detect secrets | ||
uses: alphagov/pay-ci/actions/detect-secrets@master | ||
|
||
install-and-compile: | ||
name: "Install and compile" | ||
uses: alphagov/pay-ci/.github/workflows/_run-node-install-and-compile.yml@master | ||
with: | ||
has_cypress_tests: true | ||
|
||
tests: | ||
name: "Unit tests and pacts" | ||
needs: [ install-and-compile ] | ||
uses: alphagov/pay-ci/.github/workflows/_run-node-unit-tests-and-publish-pacts.yml@master | ||
with: | ||
publish_pacts: true | ||
secrets: | ||
pact_broker_username: ${{ secrets.pact_broker_username }} | ||
pact_broker_password: ${{ secrets.pact_broker_password }} | ||
|
||
cypress-tests: | ||
name: "Cypress" | ||
needs: [ install-and-compile ] | ||
uses: alphagov/pay-ci/.github/workflows/_run-node-cypress-tests.yml@master | ||
|
||
pact-providers-contract-tests: | ||
name: "Provider tests" | ||
needs: tests | ||
uses: alphagov/pay-ci/.github/workflows/_run-provider-pact-tests-for-consumer.yml@master | ||
strategy: | ||
matrix: | ||
provider: [ 'connector' ] | ||
with: | ||
consumer: "frontend" | ||
provider: ${{ matrix.provider }} | ||
secrets: | ||
pact_broker_username: ${{ secrets.pact_broker_username }} | ||
pact_broker_password: ${{ secrets.pact_broker_password }} | ||
|
||
check-docker-base-images-are-manifests: | ||
uses: alphagov/pay-ci/.github/workflows/_validate_docker_image_is_manifest.yml@master |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/_run-tests.yml | ||
secrets: | ||
pact_broker_username: ${{ secrets.pact_broker_username }} | ||
pact_broker_password: ${{ secrets.pact_broker_password }} |
This file was deleted.
Oops, something went wrong.