Skip to content

chore(deps): update npm minor/patch #3592

chore(deps): update npm minor/patch

chore(deps): update npm minor/patch #3592

Workflow file for this run

name: EDR
on:
merge_group:
types: [checks_requested]
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
check-edr-safety:
name: Check EDR dependencies safety (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# disable for "windows-2025" due to error: Path Validation Error:
# Path(s) specified in the action for caching do(es) not exist,
# hence no cache is being saved.
# https://github.com/NomicFoundation/edr/issues/1199
matrix:
os: ["ubuntu-24.04", "macos-15"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
with:
mode: firewall
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-node
- name: Pnpm safety
run: sfw pnpm install --frozen-lockfile --prefer-offline
check-edr:
name: Check EDR
runs-on: ubuntu-24.04
needs: check-edr-safety
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- name: Cargo check no default features for all crates
run: cargo check --workspace --all-targets --no-default-features --locked
cargo-hack-edr:
name: cargo-hack check EDR
runs-on: ubuntu-24.04
needs: check-edr
permissions:
contents: read
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
# Install pre-built binaries for cargo hack
- uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
with:
tool: cargo-hack@0.6.39
- name: Cargo hack check for EDR crates
run: |
chmod +x ./.github/scripts/cargo-hack-edr.sh
./.github/scripts/cargo-hack-edr.sh
shell: bash
test-edr-rs:
name: Test EDR (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: check-edr
# Strict warning gate on test/cfg(test) compiles. The setup-rust
# composite action appends `-C target-feature=+crt-static` on
# Windows so this env value doesn't clobber the CRT-static linkage
# that matches the released NAPI artifact.
env:
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04", "macos-15", "windows-2025"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
with:
tool: cargo-llvm-cov@0.8.5
- name: Restore EDR RPC cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
**/edr-cache
key: edr-rs-rpc-cache-v1-${{ matrix.os }}
# Save key includes a hashFiles suffix; restore via the
# OS-scoped prefix to pick up the most recent matching entry.
restore-keys: |
edr-rs-rpc-cache-v1-${{ matrix.os }}-
- name: Run cargo tests (with coverage)
env:
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
run: cargo llvm-cov --workspace --all-targets --all-features --locked --no-fail-fast --codecov --output-path codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: codecov.json
name: ${{ matrix.os }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Doctests
run: cargo test --doc --workspace --features tracing --locked --no-fail-fast
- name: Save EDR RPC cache
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
**/edr-cache
key: edr-rs-rpc-cache-v1-${{ matrix.os }}-${{ hashFiles('**/edr-cache/**/*') }}
# disable until:
# 1) https://github.com/napi-rs/napi-rs/issues/1405 is resolved (Windows-only)
# 2) https://github.com/nextest-rs/nextest/issues/871 (all platforms)
# when re-enabled, remove "Run cargo test"
# Nextest
# - name: Install latest nextest release
# uses: taiki-e/install-action@nextest
# - name: Test with latest nextest release
# env:
# CARGO_INCREMENTAL: ${{ matrix.CARGO_INCREMENTAL }}
# ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
# run: cargo nextest run --workspace --all-features --all-targets
test-edr-ts:
name: Test EDR TS bindings (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: check-edr
# Cap well below GHA's 6h ceiling so a hung mocha test fails fast
# rather than burning a full job slot.
timeout-minutes: 30
# See comment on test-edr-rs above re crt-static handling.
env:
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
strategy:
fail-fast: false
matrix:
node: [20]
os: [ubuntu-24.04, macos-15, windows-2025]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
with:
node-version: ${{ matrix.node }}
- uses: ./.github/actions/setup-rust
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
with:
tool: cargo-llvm-cov@0.8.5
- name: Restore EDR RPC cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
**/edr-cache
key: edr-ts-rpc-cache-v1-${{ matrix.os }}
# Save key includes a hashFiles suffix; restore via the
# OS-scoped prefix to pick up the most recent matching entry.
restore-keys: |
edr-ts-rpc-cache-v1-${{ matrix.os }}-
- name: Install package
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run tests
env:
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
# Enables chalk colors in CI, required for logs tests
FORCE_COLOR: 3
shell: bash
run: |
source <(cargo llvm-cov show-env --sh)
pnpm -C crates/edr_napi test
# `--release` included to match `build:dev` compilation flags
cargo llvm-cov report --release --locked --codecov --output-path codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: codecov.json
name: ${{ matrix.os }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Save EDR RPC cache
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
**/edr-cache
key: edr-ts-rpc-cache-v1-${{ matrix.os }}-${{ hashFiles('**/edr-cache/**/*') }}
edr-style:
name: Check EDR Style
runs-on: ubuntu-24.04
needs: check-edr
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
with:
components: clippy
- name: Install nightly rustfmt
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
components: rustfmt
cache: false # already set up in previous step
- name: Run cargo fmt
run: cargo +nightly fmt --all --check
- name: Run cargo clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
edr-docs:
name: Build EDR Docs
runs-on: ubuntu-24.04
needs: check-edr
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- name: Cargo doc
run: |
chmod +x ./.github/scripts/cargo-doc.sh
./.github/scripts/cargo-doc.sh
shell: bash
build-and-lint:
name: Build and lint
runs-on: ubuntu-24.04
needs: check-edr-safety
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- name: Install package
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run build script
run: pnpm run build:dev
- name: Run lint script
run: pnpm run lint
edr-napi-typings-file:
name: Check that edr_napi typings file is up to date
runs-on: ubuntu-24.04
needs: check-edr-safety
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- name: Install package
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build edr_napi
run: cd crates/edr_napi && pnpm build:typingFile
- name: Check that there are no uncommitted changes
run: git diff --exit-code
edr-integration-tests:
name: Run integration tests
runs-on: ubuntu-24.04
needs: check-edr-safety
env:
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/setup-rust
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
with:
tool: cargo-llvm-cov@0.8.5
- name: Install package
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run integration tests
shell: bash
run: |
source <(cargo llvm-cov show-env --sh)
pnpm run --recursive --filter './js/integration-tests/*' test
# `--release` included to match `build:dev` compilation flags
cargo llvm-cov report --release --locked --codecov --output-path codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: codecov.json
name: ubuntu-24.04
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
cooldown-check:
name: cooldown check
runs-on: ubuntu-24.04
needs: check-edr
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- name: Cache cooldown data
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
**/edr-cache/cargo-cooldown-check
key: cooldown-check-v1-${{ hashFiles('**/Cargo.lock') }}
- uses: NomicFoundation/cargo-cooldown-check@ac40e701f9f1155741a761ac9039987fb892af4b