format #348
This file contains hidden or 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
| on: [push, workflow_dispatch, pull_request] | |
| name: CI checks | |
| jobs: | |
| build: | |
| name: Build check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install nightly toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --target=wasm32-unknown-unknown | |
| clippy: | |
| name: Lint (clippy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install nightly toolchain with clippy available | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: --all-targets -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install nightly toolchain with rustfmt available | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| - name: Install node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20.x" | |
| - name: Run npm install | |
| uses: bahmutov/npm-install@v1 | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - name: Run prettier | |
| run: npm run format:check | |
| unit-test: | |
| name: Run rust unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install nightly toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Run cargo test | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: >- | |
| -- | |
| --skip cast::float::js_functions_match_declared_types | |
| --skip cast::int::js_functions_match_declared_types | |
| --skip cast::string::js_functions_match_declared_types | |
| --skip join::tests::js_functions_match_declared_types | |
| --skip lt::tests::js_functions_match_declared_types | |
| --skip gt::tests::js_functions_match_declared_types | |
| --skip equals::tests::js_functions_match_declared_types | |
| --skip length::tests::js_functions_match_declared_types | |
| --skip letter_of::tests::js_functions_match_declared_types | |
| --skip contains::tests::js_functions_match_declared_types | |
| --skip dayssince2000::tests::js_functions_match_declared_types | |
| --skip looks::say::tests_debug::js_functions_match_declared_types | |
| --skip looks::say::tests_non_debug::js_functions_match_declared_types | |
| --skip looks::think::tests_debug::js_functions_match_declared_types | |
| --skip looks::think::tests_non_debug::js_functions_match_declared_types | |
| --skip js_functions | |
| integration-test: | |
| name: Run integration tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install nightly rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install wasm-bindgen-cli | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: wasm-bindgen-cli | |
| - name: Install cargo-outdir | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: cargo-outdir | |
| - name: Install node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "25.x" | |
| cache: "npm" | |
| - name: Run npm install | |
| uses: bahmutov/npm-install@v1 | |
| - name: Install binaryen | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| install-command: npm i -g binaryen@nightly | |
| cache-key-prefix: binaryen | |
| - name: Build | |
| run: chmod +x build.sh && ./build.sh -Wpz | |
| - name: Run integration tests | |
| run: npm run test |