Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and simplify the CI workflow #74

Merged
merged 3 commits into from Jul 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 10 additions & 34 deletions .github/workflows/ci.yml
Expand Up @@ -23,14 +23,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: (1.31.0) Downgrade serde_json
if: ${{ matrix.rust == '1.31.0' }}
Expand All @@ -39,53 +37,31 @@ jobs:
cargo update -p serde_json --precise 1.0.39

- name: Build (no_std)
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features
run: cargo build --no-default-features

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --features "${{ matrix.features }}"
run: cargo build --features "${{ matrix.features }}"

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --features "${{ matrix.features }}"
run: cargo test --features "${{ matrix.features }}"

- name: Doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --features "${{ matrix.features }}"
run: cargo doc --features "${{ matrix.features }}"

clippy:
name: Rustfmt and Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up nightly Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy

- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
# args: -- -D warnings
args: --
run: cargo clippy # -- -D warnings