Skip to content

chore(deps): lock file maintenance #106

chore(deps): lock file maintenance

chore(deps): lock file maintenance #106

Workflow file for this run

name: CI
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
checks: write
env:
CARGO_TERM_COLOR: always
FROM_REF: ${{ github.event.pull_request.base.sha || (!github.event.forced && ( github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.sha )) || format('{0}~', github.sha) }}
TO_REF: ${{ github.sha }}
jobs:
test:
name: Test for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@v2
with:
tool: nu,cargo-rdme,nextest
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install pre-commit & gitlint
run: python -m pip install pre-commit gitlint
- run: python -m pip freeze --local
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit validation
run: pre-commit run --show-diff-on-failure --color=always --from-ref ${{ env.FROM_REF }} --to-ref ${{ env.TO_REF }} --hook-stage manual
- name: gitlint validation
run: gitlint --commits ${{ env.FROM_REF }}..${{ env.TO_REF }}
if: always()
- name: Formatting
uses: clechasseur/rs-cargo@v2
with:
command: fmt
args: --check
continue-on-error: true
- name: Check
uses: clechasseur/rs-cargo@v2
with:
command: check
args: --all-targets --all-features --locked
continue-on-error: true
- name: Linting
uses: clechasseur/rs-cargo@v2
with:
command: clippy
args: --all-targets --all-features --locked -- -D warnings
continue-on-error: true
- name: Tests
run: |
cargo nextest run --profile ci --locked
cargo test --doc
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: 'target/nextest/ci/junit.xml'
check_name: JUnit Test Report for ${{ matrix.os }}
continue-on-error: true