Skip to content

Remove a lot of pop().unwrap() #7108

Remove a lot of pop().unwrap()

Remove a lot of pop().unwrap() #7108

Workflow file for this run

name: App Tests
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
actions: read
jobs:
npm-build-wasm:
uses: ./.github/workflows/build-wasm.yml
npm-test-unit:
runs-on: namespace-profile-ubuntu-2-cores
# TODO: Remove unit test dependency on Wasm binary
needs: npm-build-wasm
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm install
- uses: taiki-e/install-action@c5b1b6f479c32f356cc6f4ba672a47f63853b13b
with:
tool: wasm-pack
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Copy prepared wasm
run: |
ls -R prepared-wasm
cp prepared-wasm/kcl_wasm_lib_bg.wasm public
mkdir rust/kcl-wasm-lib/pkg
cp prepared-wasm/kcl_wasm_lib* rust/kcl-wasm-lib/pkg
- name: Copy prepared ts-rs bindings
run: |
ls -R prepared-ts-rs-bindings
mkdir rust/kcl-lib/bindings
cp -r prepared-ts-rs-bindings/* rust/kcl-lib/bindings/
- name: npm run test:unit
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
run: |-
npm run test:unit || true # let TAB determine failure
.github/ci-cd-scripts/upload-results.sh
env:
TAB_API_URL: ${{ vars.TAB_API_URL }}
TAB_API_KEY: ${{ secrets.TAB_API_KEY }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_PR_NUMBER: ${{ github.event.pull_request.number }}
CI_SUITE: unit
npm-test-integration:
runs-on: namespace-profile-ubuntu-2-cores
needs: npm-build-wasm
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm install
- uses: taiki-e/install-action@c5b1b6f479c32f356cc6f4ba672a47f63853b13b
with:
tool: wasm-pack
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Copy prepared wasm
run: |
ls -R prepared-wasm
cp prepared-wasm/kcl_wasm_lib_bg.wasm public
mkdir rust/kcl-wasm-lib/pkg
cp prepared-wasm/kcl_wasm_lib* rust/kcl-wasm-lib/pkg
- name: Copy prepared ts-rs bindings
run: |
ls -R prepared-ts-rs-bindings
mkdir rust/kcl-lib/bindings
cp -r prepared-ts-rs-bindings/* rust/kcl-lib/bindings/
- name: npm run test:integration
if: ${{ github.event_name != 'release' && github.event_name != 'schedule' }}
run: |-
xvfb-run -a npm run test:integration || true # let TAB determine failure
.github/ci-cd-scripts/upload-results.sh
env:
VITE_ZOO_API_TOKEN: ${{ secrets.ZOO_API_TOKEN }}
TAB_API_URL: ${{ vars.TAB_API_URL }}
TAB_API_KEY: ${{ secrets.TAB_API_KEY }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_PR_NUMBER: ${{ github.event.pull_request.number }}
CI_SUITE: integration