ci: Run unit tests on multiple feature sets
This commit is contained in:
parent
5e7939002b
commit
b6caa1c377
1 changed files with 4 additions and 9 deletions
13
.github/workflows/ci.yaml
vendored
13
.github/workflows/ci.yaml
vendored
|
@ -21,6 +21,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
rustalias: [stable, nightly, msrv]
|
rustalias: [stable, nightly, msrv]
|
||||||
|
feature_flag: ["--all-features", "--no-default-features", ""]
|
||||||
include:
|
include:
|
||||||
- rustalias: stable
|
- rustalias: stable
|
||||||
rust: stable
|
rust: stable
|
||||||
|
@ -28,7 +29,7 @@ jobs:
|
||||||
rust: '1.70'
|
rust: '1.70'
|
||||||
- rustalias: nightly
|
- rustalias: nightly
|
||||||
rust: nightly
|
rust: nightly
|
||||||
name: 'Build and test: ${{ matrix.os }}, ${{ matrix.rustalias }}'
|
name: 'Build and test ${{ matrix.feature_flag }}: ${{ matrix.os }}, ${{ matrix.rustalias }}'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
@ -43,19 +44,13 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
args: --all --bins --examples
|
args: --all ${{ matrix.feature_flag }} --bins --examples
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --all
|
args: --all ${{ matrix.feature_flag }}
|
||||||
|
|
||||||
- name: Tests (no features)
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --all --no-default-features
|
|
||||||
|
|
||||||
style_and_docs:
|
style_and_docs:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
||||||
|
|
Loading…
Add table
Reference in a new issue