feat: add catch_unwind protection to render to prevent Node.js process crashes
#1311
Workflow file for this run
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: Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags-ignore: | |
| - '**' | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Rustup toolchain version | |
| shell: bash | |
| id: rustup-version | |
| run: | | |
| export RUST_TOOLCHAIN_VERSION="$(grep 'channel' rust-toolchain.toml | head -1 | awk -F '"' '{print $2}')" | |
| echo "Rust toolchain version: $RUST_TOOLCHAIN_VERSION" | |
| echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| if: ${{ !matrix.settings.docker }} | |
| with: | |
| toolchain: ${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }} | |
| targets: ${{ matrix.settings.target }} | |
| components: rustfmt, clippy | |
| - name: Cache NPM dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: npm-cache-lint-node@16-${{ hashFiles('yarn.lock') }} | |
| - name: 'Install dependencies' | |
| run: yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 | |
| - name: ESLint | |
| run: yarn lint | |
| - name: Cargo fmt | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy |