CI #107
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: CI | |
on: | |
push: | |
paths-ignore: | |
- '.devcontainer/**' | |
- '.gitpod.yml' | |
- '.vscode/**' | |
pull_request: | |
paths-ignore: | |
- '.devcontainer/**' | |
- '.gitpod.yml' | |
- '.vscode/**' | |
schedule: | |
# Run against the last commit on the default branch on Friday at 8pm (UTC?) | |
- cron: '0 20 * * 5' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- 1.61.0 # MSRV | |
- nightly # For checking minimum version dependencies. | |
steps: | |
- name: Checkout Mini Moka | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v1 | |
- name: cargo clean | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clean | |
- name: Downgrade dependencies to minimal versions (Nightly only) | |
uses: actions-rs/cargo@v1 | |
if: ${{ matrix.rust == 'nightly' }} | |
with: | |
command: update | |
args: -Z minimal-versions | |
- name: Pin some dependencies to specific versions (MSRV only) | |
if: ${{ matrix.rust == '1.61.0' }} | |
run: ./.ci_extras/pin-crate-vers-msrv.sh | |
- name: Show cargo tree | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tree | |
- name: Run tests (debug, sync feature) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --features sync | |
- name: Run tests (release, sync feature) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --release --features sync |