Without a rust-toolchain file the action installs a minimal stable, which carries neither component; the format step failed on the first push. Name the two the job uses.
30 lines
600 B
YAML
30 lines
600 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: https://gitea.com/actions/checkout@v4
|
|
|
|
# Without a rust-toolchain file this installs a minimal stable,
|
|
# which carries neither component; the job uses both.
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test
|