[TRUNK-13813] Smoke test PRs #466
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: Build and test context-js | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: {} | |
workflow_dispatch: {} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and build wasm | |
uses: ./.github/actions/setup_build_wasm | |
if: "!cancelled()" | |
- name: Upload wasm package | |
uses: actions/upload-artifact@v4 | |
if: "!cancelled()" | |
with: | |
name: context-js-pkg | |
path: ./context-js/pkg | |
- name: Test wasm package | |
if: "!cancelled()" | |
run: pnpm run --dir ./context-js test | |
- name: Package wasm package | |
if: "!cancelled()" | |
run: pnpm pack --dir ./context-js/pkg | |
- name: Upload wasm package to S3 | |
uses: ./.github/actions/upload_to_s3 | |
if: "!cancelled() && github.event_name != 'pull_request'" | |
with: | |
bucket: ${{ secrets.S3_ASSET_BUCKET }} | |
name: context-js-0.1.0.tgz | |
path: context-js/pkg/context-js-0.1.0.tgz | |
role-to-assume: ${{ secrets.S3_UPLOAD_ROLE_ARN }} |