Skip to content

Commit af1941b

Browse files
authored
Merge pull request #58 from cardoe/maybe-fix-ci
ci: updates because many steps are retired
2 parents 037fdc0 + 245aa1f commit af1941b

File tree

2 files changed

+32
-49
lines changed

2 files changed

+32
-49
lines changed

.github/workflows/ci.yml

+31-49
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,55 @@
11
name: CI
22
on:
3+
workflow_dispatch:
34
pull_request:
45
push:
56
branches:
67
- master
78
env:
89
CARGO_TERM_COLOR: always
910
jobs:
10-
test:
11+
msrv:
1112
strategy:
1213
matrix:
1314
rust:
14-
- rust: stable
15+
- version: stable
1516
command: test
1617
args: ""
17-
- rust: 1.48.0
18+
- version: 1.48.0
1819
command: check
1920
args: "--locked"
2021
runs-on: ubuntu-latest
2122
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions-rs/toolchain@v1
24-
with:
25-
profile: minimal
26-
toolchain: ${{ matrix.rust.rust }}
27-
override: true
23+
- uses: actions/checkout@v4
24+
- name: install Rust
25+
run: rustup toolchain install ${{ matrix.rust.version }} --profile minimal --allow-downgrade
2826
- run: mv Cargo.lock.msrv Cargo.lock
29-
if: ${{ matrix.rust.rust}} == 1.48.0
30-
- uses: actions-rs/cargo@v1
31-
with:
32-
command: ${{ matrix.rust.command }}
33-
args: ${{ matrix.rust.args }}
34-
fmt-clippy:
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v2
38-
- uses: actions-rs/toolchain@v1
39-
with:
40-
profile: minimal
41-
toolchain: stable
42-
override: true
43-
components: rustfmt, clippy
44-
- uses: actions-rs/cargo@v1
45-
with:
46-
command: fmt
47-
args: --all -- --check
48-
- uses: actions-rs/clippy-check@v1
49-
with:
50-
token: ${{ secrets.GITHUB_TOKEN }}
51-
args: --all-features
52-
coverage:
27+
if: ${{ matrix.rust.version}} == 1.48.0
28+
- name: cargo check/test
29+
run: cargo ${{ matrix.rust.command }} ${{ matrix.rust.args }}
30+
31+
test:
5332
runs-on: ubuntu-latest
5433
steps:
55-
- uses: actions/checkout@v2
56-
- uses: actions-rs/toolchain@v1
57-
with:
58-
toolchain: stable
59-
override: true
60-
- uses: actions-rs/[email protected]
61-
with:
62-
args: '--ignore-tests'
34+
- uses: actions/checkout@v4
35+
- name: install Rust
36+
run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --allow-downgrade
37+
- name: cargo fmt
38+
run: cargo fmt --check
39+
- name: cargo clippy
40+
run: cargo clippy --all-features -- --deny warnings
41+
- name: install tarpaulin
42+
uses: baptiste0928/cargo-install@v2
43+
with:
44+
crate: cargo-tarpaulin
45+
- name: cargo tarpaulin
46+
run: cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10
47+
6348
bench:
6449
runs-on: ubuntu-latest
6550
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions-rs/toolchain@v1
68-
with:
69-
toolchain: nightly
70-
override: true
71-
- uses: actions-rs/cargo@v1
72-
with:
73-
command: bench
51+
- uses: actions/checkout@v4
52+
- name: install Rust
53+
run: rustup toolchain install nightly --profile minimal
54+
- name: cargo bench
55+
run: cargo +nightly bench --all-features

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
88

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

1112
//! A simple logger to provide semantics similar to what is expected

0 commit comments

Comments
 (0)