CI: Test on both MSRV and latest stable

This commit is contained in:
Jack Grigg
2024-07-30 05:54:36 +00:00
parent 34011088a0
commit 8aeb9f3da7
+42 -3
View File
@@ -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