Skip to content

Add ci workflow

Add ci workflow #1

Workflow file for this run

name: CI
env:
TYPOS_LINK: "https://github.com/crate-ci/typos/releases/download"
TYPOS_VERSION: "1.23.4"
on:
branches:
- main
pull_request: {}
jobs:
crates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# --------------------------------------------------------------------------------
- uses: dtolnay/rust-toolchain@master
with:
components: clippy, rustfmt
toolchain: stable
# --------------------------------------------------------------------------------
- uses: Swatinem/rust-cache@v2
# --------------------------------------------------------------------------------
- name: Audit
run: cargo xtask check audit
# --------------------------------------------------------------------------------
- name: Format
shell: bash
env:
# work around for colors
# see: https://github.com/rust-lang/rustfmt/issues/3385
TERM: xterm-256color
run: cargo xtask check format
# --------------------------------------------------------------------------------
- name: Lint
run: cargo xtask check lint
# --------------------------------------------------------------------------------
- name: Typos
uses: tracel-ai/github-actions/actions/check-typos@v1
# --------------------------------------------------------------------------------
- name: Build
run: cargo xtask build
# --------------------------------------------------------------------------------
- name: Unit Tests
run: cargo xtask test unit
# --------------------------------------------------------------------------------
- name: Integration Tests
run: cargo xtask test integration
# --------------------------------------------------------------------------------
- name: Documentation Tests
run: cargo xtask doc tests