Run cargo format before check #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- 'docs/**' | |
workflow_dispatch: | |
jobs: | |
typescript: | |
name: TypeScript CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install pnpm dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Check format with Prettier | |
run: pnpm prettier --check . | |
- name: Typecheck with TypeScript | |
run: pnpm typecheck | |
rust: | |
name: Rust CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install system dependencies | |
run: |- | |
sudo apt-get -yqq update | |
sudo apt-get install -yqq libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev | |
- name: Install Rust toolchain | |
run: rustup toolchain install stable --profile minimal | |
- name: Install Rust dependencies | |
run: cargo install cargo-hack | |
- name: Check Rust format | |
run: cargo fmt -- --check | |
- name: Check Rust crate | |
run: cargo hack check --feature-powerset --no-dev-deps \ | |
--group-features bigdecimal,bit-vec,bson,bytesize,chrono,glam,indexmap,ipnetwork,mac_address,rust_decimal,time,uhlc,uuid | |
- name: Run Clippy | |
uses: giraffate/clippy-action@v1 | |
with: | |
reporter: github-pr-review | |
tool_name: 'Clippy' | |
filter_mode: diff_context | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
clippy_flags: --workspace --all-features --locked | |
fail_on_error: true |