Skip to content

Pin dependencies

Pin dependencies #413

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: CI
jobs:
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# We need to fetch the entire history so clippy can run the
# e2e-example/client build script.
fetch-depth: 0
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: rustfmt, clippy
- uses: taiki-e/install-action@95b969f4676e9dd6df07c1be3109d892a12b7653 # just
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: partition-${{ matrix.partition }}
- name: Lint (clippy)
run: cargo clippy --all-targets
- name: Lint (rustfmt)
run: cargo xfmt --check
- name: Run rustdoc
run: just rustdoc
- name: Check for differences
run: git diff --exit-code
build-and-test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
# 1.88 is the MSRV
rust-version: ["1.88", "stable"]
fail-fast: false
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# We need to fetch the entire history so the tests can run merge-base
# operations.
fetch-depth: 0
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master
with:
toolchain: ${{ matrix.rust-version }}
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: partition-${{ matrix.partition }}
- uses: taiki-e/install-action@fea5ec4b3b61601cec82312580751f3083e6f651 # nextest
- uses: taiki-e/install-action@59012be0884e296ca2da49b530610e72c49039ad # v2
with:
tool: jj-cli
- name: Build
run: cargo build
- name: Run tests
run: cargo nextest run --profile ci
- name: Doctests
run: cargo test --doc