Skip to content

Bump axios-mock-adapter from 1.22.0 to 2.0.0 #273

Bump axios-mock-adapter from 1.22.0 to 2.0.0

Bump axios-mock-adapter from 1.22.0 to 2.0.0 #273

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
mockinfra:
runs-on: "ubuntu-latest"
name: "E2E Mock Infra"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: ./apply
id: run
with:
token: ${{ secrets.TFC_TOKEN }}
organization: ${{ secrets.TFC_ORGANIZATION }}
# The workspace is set up to use .github/workspace/main.tf in the main branch
workspace: test-terraform-cloud-action
replace-addrs: null_resource.example
e2e:
runs-on: "ubuntu-latest"
name: "E2E Test Outputs"
needs: [ mockinfra ]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Fetch outputs
id: fetch
uses: ./outputs
with:
token: ${{ secrets.TFC_TOKEN }}
organization: ${{ secrets.TFC_ORGANIZATION }}
workspace: test-terraform-cloud-action
- name: Assertions
env:
JSON_DATA: ${{ steps.fetch.outputs.workspace-outputs-json }}
run: |
[[ $(jq -n "$JSON_DATA" | jq .number -re) = "3.14159" ]] && echo PASS || (echo FAIL && exit 1)
[[ $(jq -n "$JSON_DATA" | jq .string -re) = "string" ]] && echo PASS || (echo FAIL && exit 1)
[[ $(jq -n "$JSON_DATA" | jq .tuple[0] -re) = "hello" ]] && echo PASS || (echo FAIL && exit 1)
[[ $(jq -n "$JSON_DATA" | jq .tuple[1] -re) = "list" ]] && echo PASS || (echo FAIL && exit 1)
[[ $(jq -n "$JSON_DATA" | jq .object.hello -re) = "object" ]] && echo PASS || (echo FAIL && exit 1)
echo "The following lines should be redacted! (You should see *** and nothing else)"
jq -n "$JSON_DATA" | jq .secretobject.hello[0] -re
jq -n "$JSON_DATA" | jq .secretobject.hello[1] -re
jq -n "$JSON_DATA" | jq .secretstring -re
destroy-infra:
runs-on: ubuntu-latest
name: E2E Destroy Infra
needs: [ e2e ]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Destroy mock infra
uses: ./destroy
with:
token: ${{ secrets.TFC_TOKEN }}
organization: ${{ secrets.TFC_ORGANIZATION }}
workspace: test-terraform-cloud-action
wait: true # default is false
lint-test:
runs-on: "ubuntu-latest"
name: "Lint & Test"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm
- name: npm ci
run: npm ci
- name: Format Check
run: npm run format-check
- name: Verify
run: |
npm run build
# Fail if "npm run build" generated new changes in dist
git update-index --refresh dist/* && git diff-index --quiet HEAD dist
- name: Test
run: npm run test