Merge pull request #137 from str4d/ci-updates

Update CI
This commit is contained in:
str4d
2023-03-21 07:38:56 +00:00
committed by GitHub
5 changed files with 56 additions and 95 deletions
+10 -94
View File
@@ -23,118 +23,42 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- name: Install build dependencies - name: Install build dependencies
run: sudo apt install ${{ matrix.build_deps }} run: sudo apt install ${{ matrix.build_deps }}
if: matrix.build_deps != '' if: matrix.build_deps != ''
- name: Install test dependencies - name: Install test dependencies
run: cargo install rage run: cargo install rage
- name: cargo fetch - run: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Build tests - name: Build tests
uses: actions-rs/cargo@v1 run: cargo build --verbose --tests
with:
command: build
args: --verbose --tests
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: cargo test --verbose
with:
command: test
args: --verbose
clippy:
name: Clippy (1.60.0)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
components: clippy
override: true
- name: Install build dependencies
run: sudo apt install libpcsclite-dev
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.60.0)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
clippy-nightly:
name: Clippy (nightly)
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
- name: Install build dependencies
run: sudo apt install libpcsclite-dev
- name: Run Clippy (nightly)
uses: actions-rs/clippy-check@v1
continue-on-error: true
with:
name: Clippy (nightly)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets
codecov: codecov:
name: Code coverage name: Code coverage
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Use stable for this to ensure that cargo-tarpaulin can be built.
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install build dependencies - name: Install build dependencies
run: sudo apt install libpcsclite-dev run: sudo apt install libpcsclite-dev
- name: Install coverage dependencies
run: cargo install cargo-tarpaulin
- name: Generate coverage report - name: Generate coverage report
uses: actions-rs/tarpaulin@v0.1 run: cargo tarpaulin --engine llvm --all-features --release --timeout 600 --out Xml
with:
args: --release --timeout 180 --out Xml
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1 uses: codecov/codecov-action@v3.1.1
with:
token: ${{secrets.CODECOV_TOKEN}}
doc-links: doc-links:
name: Intra-doc links name: Intra-doc links
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- name: Install build dependencies - name: Install build dependencies
run: sudo apt install libpcsclite-dev run: sudo apt install libpcsclite-dev
- name: cargo fetch - run: cargo fetch
uses: actions-rs/cargo@v1 # Requires #![deny(rustdoc::broken_intra_doc_links)] in crates.
with:
command: fetch
# Ensure intra-documentation links all resolve correctly
# Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- name: Check intra-doc links - name: Check intra-doc links
uses: actions-rs/cargo@v1 run: cargo doc --document-private-items
with:
command: doc
args: --document-private-items
fmt: fmt:
name: Rustfmt name: Rustfmt
@@ -142,13 +66,5 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
components: rustfmt
override: true
- name: Check formatting - name: Check formatting
uses: actions-rs/cargo@v1 run: cargo fmt -- --check
with:
command: fmt
args: -- --check
+23
View File
@@ -0,0 +1,23 @@
name: Beta lints
# We only run these lints on trial-merges of PRs to reduce noise.
on: pull_request
jobs:
clippy-beta:
name: Clippy (beta)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@beta
id: toolchain
- run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Install build dependencies
run: sudo apt install libpcsclite-dev
- name: Clippy (beta)
uses: actions-rs/clippy-check@v1
with:
name: Clippy (beta)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -W clippy::all
+20
View File
@@ -0,0 +1,20 @@
name: Stable lints
# We only run these lints on trial-merges of PRs to reduce noise.
on: pull_request
jobs:
clippy:
name: Clippy (MSRV)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install build dependencies
run: sudo apt install libpcsclite-dev
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (MSRV)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
-1
View File
@@ -1 +0,0 @@
1.60.0
+3
View File
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.60.0"
components = ["clippy", "rustfmt"]