Skip to content

Commit

Permalink
Use TypeScript to verify CLI reference output (#4311)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Dec 7, 2024
1 parent c345cc8 commit 5b38cb1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- run: rustup update --no-self-update stable && rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check

# Check TOML style by using Taplo.
taplo:
name: Taplo
Expand Down Expand Up @@ -240,6 +240,22 @@ jobs:
# WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE: 1
# - run: cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features "Node Window Document"

# This checks that the output of the CLI is actually valid JavaScript and TypeScript
test_cli_reference_typescript:
name: Run CLI reference TypeScript check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm i -g typescript
- run: npm i --save @types/node @types/deno
- name: Check TypeScript output
run: tsc --noEmit --skipLibCheck --lib esnext,dom $(echo crates/cli/tests/reference/*.d.ts)
- name: Check JavaScript output
run: tsc --noEmit --skipLibCheck --lib esnext,dom --module esnext --allowJs $(echo crates/cli/tests/reference/*.js)

test_native:
name: Run native tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5b38cb1

Please sign in to comment.