Test: Typecheck #1
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: "Test: Typecheck" | |
on: | |
workflow_dispatch: | |
env: | |
NODE_VERSION: 18 | |
jobs: | |
typecheck: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up PNPM | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Cache Rust Output | |
id: rust-output-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
wasm_module/pkg | |
wasm_module/target | |
key: rust-output-${{ env.NODE_VERSION }}-${{ hashFiles('wasm_module', '**/pnpm-lock.yaml') }} | |
restore-keys: rust-output- | |
- name: Cache Rust Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: wasm_module | |
if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
- name: Compile Rust | |
run: pnpm wasm | |
if: steps.rust-output-cache.outputs.cache-hit != 'true' | |
- name: Typecheck with tsc | |
run: pnpm tscCheck |