fix: validate new prefix length against old prefix #2867
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
| name: JS bindings CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| # When we change pyproject.toml, we want to ensure that the maturin builds still work | |
| - test-data/** | |
| - crates/** | |
| - Cargo.* | |
| # When something in the bindings themselves changes | |
| - "js-rattler/**/*" | |
| # Or when this workflow changes | |
| - ".github/workflows/js-bindings.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| RUST_LOG: info | |
| RUST_BACKTRACE: 1 | |
| RUSTFLAGS: "-D warnings --cfg getrandom_backend=\"wasm_js\"" | |
| jobs: | |
| format_lint_test: | |
| name: Format, Lint and Test the JS bindings | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: ["20.x"] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| workspaces: js-rattler | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup component add clippy rustfmt | |
| rustup target add wasm32-unknown-unknown | |
| rustup component add rust-src --target wasm32-unknown-unknown | |
| - name: Run rustfmt | |
| working-directory: js-rattler | |
| run: cargo fmt --all --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets | |
| working-directory: js-rattler | |
| - run: npm ci | |
| working-directory: js-rattler | |
| - run: npm run fmt:check | |
| working-directory: js-rattler | |
| - run: npm run build | |
| working-directory: js-rattler | |
| - run: npm test | |
| working-directory: js-rattler | |
| # some e2e test to make sure our build works | |
| - run: | | |
| set -euxo pipefail | |
| node ./e2e/main.cjs | |
| node ./e2e/main.mjs | |
| working-directory: js-rattler |