1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 19:51:06 +01:00

ci: fix post-merge tool installs

This commit is contained in:
Rob Ede 2023-07-20 00:22:55 +01:00
parent 3eba5b152e
commit 9017de439f
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 12 additions and 8 deletions

View File

@ -101,11 +101,13 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v1
with: { tool: cargo-tarpaulin }
- name: Generate coverage file
if: github.ref == 'refs/heads/master'
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --out Xml --verbose
run: cargo tarpaulin --out Xml --verbose
- name: Upload to Codecov
if: github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v3
@ -121,8 +123,9 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
- uses: taiki-e/install-action@v1
with: { tool: cargo-hack, cargo-minimal-versions }
- name: Install cargo-hack & cargo-minimal-versions
uses: taiki-e/install-action@v1
with: { tool: 'cargo-hack,cargo-minimal-versions' }
- name: Check With Minimal Versions
run: cargo minimal-versions check
@ -137,7 +140,8 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-nextest
run: cargo install cargo-nextest
uses: taiki-e/install-action@v1
with: { tool: cargo-nextest }
- name: Test with cargo-nextest
run: cargo nextest run

View File

@ -28,8 +28,8 @@ type AttributeArgs = syn::punctuated::Punctuated<syn::Meta, syn::Token![,]>;
/// println!("Hello world");
/// }
/// ```
// #[allow(clippy::needless_doctest_main)]
// #[cfg(not(test))] // Work around for rust-lang/rust#62127
#[allow(clippy::needless_doctest_main)]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
#[proc_macro_attribute]
pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
let mut input = match syn::parse::<syn::ItemFn>(item.clone()) {