Skip to content

fix recursion + GitHub CI #2

fix recursion + GitHub CI

fix recursion + GitHub CI #2

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
check:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: rustfmt
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
- name: Check fmt
run: cargo fmt -- --check
- name: Check all targets
run: cargo check --all --all-targets --all-features
clippy:
name: cargo clippy
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-A unknown_lints -D warnings"
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
run: cargo clippy --workspace --all-targets --all-features
test:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --all --all-features