mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 15:22:30 +00:00
bfa388420b
There is enough open work on this, we should probably not have it public yet, so putting it behind a gate. See https://github.com/clap-rs/clap/issues/2924
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
name: CI-PR
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
concurrency:
|
|
group: ci-pr-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
ci-pr:
|
|
name: CI-PR
|
|
needs: [test-minimal, test-full, msrv]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Done
|
|
run: exit 0
|
|
test-minimal:
|
|
name: Tests (Minimal)
|
|
env:
|
|
FLAGS: --no-default-features --features 'std cargo'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
rust: [stable]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- name: Cache Builds
|
|
uses: Swatinem/rust-cache@v1
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Compile
|
|
run: cargo test --no-run ${{ env.FLAGS }}
|
|
- name: Test
|
|
run: cargo test ${{ env.FLAGS }}
|
|
test-full:
|
|
name: Tests (Full)
|
|
env:
|
|
FLAGS: --features 'wrap_help yaml regex unstable-replace unstable-multicall unstable-grouped'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
rust: [stable]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- name: Cache Builds
|
|
uses: Swatinem/rust-cache@v1
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Compile
|
|
run: cargo test --no-run ${{ env.FLAGS }}
|
|
- name: Test
|
|
run: cargo test ${{ env.FLAGS }}
|
|
msrv:
|
|
name: "Check MSRV: 1.54.0"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: 1.54.0 # MSRV
|
|
override: true
|
|
- name: Cache Builds
|
|
uses: Swatinem/rust-cache@v1
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Default features
|
|
run: cargo check --all-targets
|
|
- name: All features + Debug
|
|
run: cargo check --all-targets --features "wrap_help yaml regex unstable-replace unstable-multicall unstable-grouped debug"
|
|
- name: No features
|
|
run: cargo check --all-targets --no-default-features --features "std cargo"
|
|
- name: UI Tests
|
|
run: cargo test --package clap_derive -- ui
|