Elide explicit lifetime annotations #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- ".github/workflows/*" | |
jobs: | |
fmt: | |
name: Source formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3.2.0 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
build: | |
name: Lint and test check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- 1.56.0 | |
- stable | |
- nightly | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3.2.0 | |
- name: Restore cargo cache | |
uses: actions/cache@v3.2.1 | |
env: | |
cache-name: ci | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
~/.cargo/bin | |
target | |
key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }} | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: clippy | |
- name: Run lints | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --example all_xterm_colors --example colors --example dyn_colors --example override --example custom_colors --example extra_colors --example supports_color | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: Run tests with feature powerset | |
# Note: you might think that we can also pass in `--exclude-all-features` here, but that | |
# isn't the case because if you pass in a --example, it doesn't run doctests. The below | |
# expression will run doctests as well. | |
run: cargo hack --feature-powerset |