name: Memory Leak Detect env: DEBUG: 'napi:*' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: push: branches: - main pull_request: jobs: build_and_test: name: Memory leak detect job runs-on: ubuntu-latest timeout-minutes: 40 continue-on-error: true steps: - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: 'yarn' - name: Install stable uses: dtolnay/rust-toolchain@stable with: targets: x86_64-unknown-linux-gnu toolchain: stable - name: Cache cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ .cargo-cache/registry/index/ .cargo-cache/registry/cache/ .cargo-cache/git/db/ target/ key: stable-memory-leak-detect-cargo-cache - name: 'Install dependencies' run: yarn install --immutable - name: 'Pull docker image' run: docker pull node:lts-slim - name: Build in docker run: yarn build:memory --use-napi-cross - name: Memory leak tests run: yarn test:memory env: RUST_BACKTRACE: 1 - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache