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

ci: updates because many steps are retired #58

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 31 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,55 @@
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
test:
msrv:
strategy:
matrix:
rust:
- rust: stable
- version: stable
command: test
args: ""
- rust: 1.48.0
- version: 1.48.0
command: check
args: "--locked"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust.rust }}
override: true
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install ${{ matrix.rust.version }} --profile minimal --allow-downgrade
- run: mv Cargo.lock.msrv Cargo.lock
if: ${{ matrix.rust.rust}} == 1.48.0
- uses: actions-rs/cargo@v1
with:
command: ${{ matrix.rust.command }}
args: ${{ matrix.rust.args }}
fmt-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
coverage:
if: ${{ matrix.rust.version}} == 1.48.0
- name: cargo check/test
run: cargo ${{ matrix.rust.command }} ${{ matrix.rust.args }}

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/[email protected]
with:
args: '--ignore-tests'
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --allow-downgrade
- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
run: cargo clippy --all-features -- --deny warnings
- name: install tarpaulin
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-tarpaulin
- name: cargo tarpaulin
run: cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10

bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: bench
- uses: actions/checkout@v4
- name: install Rust
run: rustup toolchain install nightly --profile minimal
- name: cargo bench
run: cargo +nightly bench --all-features
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(clippy::needless_doctest_main)]
#![doc(html_root_url = "https://docs.rs/stderrlog/0.6.0")]

//! A simple logger to provide semantics similar to what is expected
Expand Down
Loading