Skip to content

Debug sidetree mock #107

Debug sidetree mock

Debug sidetree mock #107

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
# ensure that the workflow is only triggered once per PR, subsequent pushes to the PR will cancel
# and restart the workflow. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: install rust nightly for rustfmt and clippy
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Install taplo
uses: baptiste0928/cargo-install@v3
with:
crate: taplo-cli
- name: Check format
run: |
cargo +nightly fmt --all -- --check
cargo clippy --all-targets -- -D warnings
- name: Check typos
uses: crate-ci/typos@master
- name: Check toml format
run: taplo validate --colors never --no-schema
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo nextest run
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/nextest/default/junit.xml'
# empty job for branch protection
ci-check:
runs-on: ubuntu-latest
needs: [lint, test]
timeout-minutes: 1
steps:
- name: Check
run: echo "All checks passed"