mirror of
https://github.com/clap-rs/clap
synced 2025-01-09 11:18:45 +00:00
88 lines
2.3 KiB
YAML
88 lines
2.3 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'
|
||
|
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 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
|