From b66aea536be0caa1505e3e21abd3cec3eb07d91f Mon Sep 17 00:00:00 2001 From: Mathias Klippinge Date: Thu, 21 Dec 2023 09:30:43 +0100 Subject: [PATCH] Smoke test release candidate --- .github/actions/setup-environment/action.yml | 7 ++- .github/workflows/smoke.js.yml | 64 ++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/smoke.js.yml diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index f6bba201..007be0bb 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -5,6 +5,9 @@ inputs: node-version: description: 'Node.js version' default: '18' + path: + description: 'Path to the directory containing the package.json file' + default: '.' runs: using: composite @@ -30,5 +33,7 @@ runs: ${{ runner.os }}-yarn- - name: Install dependencies - run: yarn install --immutable --immutable-cache + run: | + cd ${{ inputs.path }} + yarn install --immutable --immutable-cache shell: bash diff --git a/.github/workflows/smoke.js.yml b/.github/workflows/smoke.js.yml new file mode 100644 index 00000000..61517bef --- /dev/null +++ b/.github/workflows/smoke.js.yml @@ -0,0 +1,64 @@ +name: Smoke Test Release + +concurrency: + cancel-in-progress: true + group: 'smoke-test-${{ github.ref_name }}' + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + smoke-test: + name: Smoke Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: mappersmith + - uses: actions/checkout@v4 + with: + repository: klippx/mappersmith-consumer + path: mappersmith-consumer + + - uses: ./mappersmith/.github/actions/setup-environment + with: + path: mappersmith + - uses: ./mappersmith/.github/actions/setup-environment + with: + path: mappersmith-consumer + + - name: Build mappersmith release candidate + run: | + cd mappersmith + yarn publish:prepare + shell: bash + + - name: Link mappersmith release candidate + run: | + cd mappersmith-consumer + yarn link ../mappersmith/dist + shell: bash + + - name: Smoke test tsc compile + run: | + cd mappersmith-consumer + yarn build:all + shell: bash + continue-on-error: true + + - name: Smoke test unit tests + run: | + cd mappersmith-consumer + yarn test:all + shell: bash + continue-on-error: true + + - name: Smoke test integration tests + run: | + cd mappersmith-consumer + yarn integration:all + shell: bash + continue-on-error: true