[UIE-152] Update VS Code setting (#4579) #344
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: Publish Pacts | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ dev ] | |
jobs: | |
setup-and-test: | |
runs-on: ubuntu-latest | |
outputs: | |
pact-b64: ${{ steps.encode.outputs.pact-b64 }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
yarn install | |
- name: Run tests | |
run: yarn test Cbas.test.js # As of now, this is the only contract test file in terra-ui. | |
# When another test file is added, a naming convention for contract tests should be established, | |
# so that contract tests can be run in isolation. | |
- name: Encode the pact as non-breaking base 64 string | |
id: encode | |
env: | |
PACT_FULL_PATH: 'pacts/terra-ui-cbas.json' # Currently, workflows are limited to a single Pact file (see WM-1858). | |
run: | | |
NON_BREAKING_B64=$(cat $PACT_FULL_PATH | base64 -w 0) | |
echo "pact-b64=${NON_BREAKING_B64}" >> $GITHUB_OUTPUT | |
echo $NON_BREAKING_B64 | |
publish-pact-workflow: | |
runs-on: ubuntu-latest | |
needs: [setup-and-test] | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Publish Pact contracts | |
uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 #commit sha for v2.1.1 | |
with: | |
workflow: publish-contracts.yaml | |
repo: broadinstitute/terra-github-workflows | |
ref: refs/heads/main | |
token: ${{ secrets.BROADBOT_TOKEN}} # github token for access to kick off a job in the private repo | |
inputs: '{ "pact-b64": "${{ needs.setup-and-test.outputs.pact-b64 }}", "repo-owner": "DataBiosphere", "repo-name": "terra-ui", "repo-branch": "dev" }' |