ci: borrow ci setup from eza
This commit is contained in:
parent
0a7e6cf439
commit
d32dbed166
1 changed files with 46 additions and 0 deletions
46
.github/workflows/unit-tests.yml
vendored
Normal file
46
.github/workflows/unit-tests.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Unit tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '.github/workflows/*'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '.github/workflows/*'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
rust: [1.71.0, stable, beta, nightly]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
run: cargo install cargo-hack@0.5.27
|
||||
|
||||
- name: Run unit tests
|
||||
run: cargo hack test --feature-powerset
|
Loading…
Reference in a new issue