Merge pull request #161 from str4d/packages #471
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI checks | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test on ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
name: [linux, windows, macos] | |
include: | |
- name: linux | |
os: ubuntu-latest | |
build_deps: > | |
libpcsclite-dev | |
- name: windows | |
os: windows-latest | |
- name: macos | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: sudo apt install ${{ matrix.build_deps }} | |
if: matrix.build_deps != '' | |
- name: Install test dependencies | |
run: cargo install rage | |
- run: cargo fetch | |
- name: Build tests | |
run: cargo build --verbose --tests | |
- name: Run tests | |
run: cargo test --verbose | |
codecov: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: sudo apt install libpcsclite-dev | |
- name: Install coverage dependencies | |
run: cargo install cargo-tarpaulin | |
- name: Generate coverage report | |
run: cargo tarpaulin --engine llvm --all-features --release --timeout 600 --out Xml | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
doc-links: | |
name: Intra-doc links | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: sudo apt install libpcsclite-dev | |
- run: cargo fetch | |
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. | |
- name: Check intra-doc links | |
run: cargo doc --document-private-items | |
fmt: | |
name: Rustfmt | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check formatting | |
run: cargo fmt -- --check |