deno_graph 0.108.1

Module graph analysis for deno
Documentation
name: ecosystem

on: [push, pull_request]

jobs:
  rust:
    name: shard ${{ matrix.shard }}
    runs-on: ubuntu-latest
    timeout-minutes: 60

    env:
      CARGO_INCREMENTAL: 0
      RUST_BACKTRACE: full
      RUSTFLAGS: -D warnings

    if: github.event_name == 'push' || !startsWith(github.event.pull_request.head.label, 'denoland:')

    strategy:
      matrix:
        shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
      fail-fast: false

    steps:
      - name: Clone repository
        uses: actions/checkout@v5

      - name: Install rust
        uses: dsherret/rust-toolchain-file@v1

      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}

      - name: Install up Deno
        uses: denoland/setup-deno@v2
        with:
          deno-version: canary

      - name: Cache JSR mirror
        uses: actions/cache@v4
        with:
          path: tests/ecosystem/jsr_mirror/
          key: ecosystem-jsr-mirror-${{ hashFiles('tests/ecosystem/jsr_versions.json') }}
          restore-keys: ecosystem-jsr-mirror-

      - name: Mirror JSR
        run: deno run -A ./tests/ecosystem/jsr_mirror.ts

      - name: Run tests
        run: cargo test --test ecosystem
        env:
          SHARD_INDEX: ${{ matrix.shard }}
          SHARD_COUNT: 12