CI: Test on both MSRV and latest stable
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
name: CI checks
|
name: CI checks
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test-msrv:
|
||||||
name: Test on ${{ matrix.name }}
|
name: Test MSRV on ${{ matrix.name }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -35,6 +38,42 @@ jobs:
|
|||||||
- name: Verify working directory is clean
|
- name: Verify working directory is clean
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
|
|
||||||
|
test-latest:
|
||||||
|
name: Test latest stable 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@v4
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: sudo apt install ${{ matrix.build_deps }}
|
||||||
|
if: matrix.build_deps != ''
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
id: toolchain
|
||||||
|
- run: rustup override set ${{steps.toolchain.outputs.name}}
|
||||||
|
- name: Install test dependencies
|
||||||
|
run: cargo install rage
|
||||||
|
- name: Remove lockfile to build with latest dependencies
|
||||||
|
run: rm Cargo.lock
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test
|
||||||
|
- name: Verify working directory is clean (excluding lockfile)
|
||||||
|
run: git diff --exit-code ':!Cargo.lock'
|
||||||
|
|
||||||
codecov:
|
codecov:
|
||||||
name: Code coverage
|
name: Code coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user