CI / ci (ubuntu-latest) (push) Has been cancelled
CI / ci (windows-latest) (push) Has been cancelled
* ci.yml: trigger on pushes/PRs to master instead of main. The repo's default branch is master, so the previous config never fired and CI silently passed on every commit. * Add README.md (English) and README-zh.md (Chinese), the bilingual project documentation referenced by AGENTS.md.
38 lines
670 B
YAML
38 lines
670 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check --all
|
|
|
|
- name: Check
|
|
run: cargo check --workspace
|
|
|
|
- name: Test
|
|
run: cargo test --workspace
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace -- -D warnings
|