Skip to content

Update CI

Update CI #41

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
# == CHECK == #
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust-toolchains:
- 1.65.0
- stable
- beta
- nightly
locked: ['']
include:
- rust-toolchains: 1.65.0
locked: --locked
steps:
- name: Install Rust toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-toolchains }}
- name: Override toolchain
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Clone repo
uses: actions/checkout@v4
- name: Cargo check
run: cargo check --verbose
# == TEST (NO UI) == #
test-no-ui:
name: Test (no UI)
runs-on: ${{ matrix.os }}
needs: [check]
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
rust-toolchains:
- 1.65.0
- stable
- nightly
steps:
- name: Install Rust toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-toolchains }}
- name: Override toolchain
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Clone repo
uses: actions/checkout@v4
- name: Cargo +nightly test (no UI)
if: matrix.rust-toolchains == 'nightly'
env:
CI_SKIP_UI_TESTS: "1"
run: cargo test ${{ matrix.locked }} --verbose --features nightly
- name: Cargo test (no UI)
if: matrix.rust-toolchains != 'nightly'
env:
CI_SKIP_UI_TESTS: "1"
run: cargo test ${{ matrix.locked }} --verbose
# == TEST (UI) ==
test-ui:
name: Test (UI) on MSRV
runs-on: ubuntu-latest
needs: [test-no-ui]
steps:
- name: Install Rust toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.65.0
- name: Clone repo
uses: actions/checkout@v4
- name: Cargo test (UI)
env:
RUSTC_BOOTSTRAP: 1
run: cargo test ${{ matrix.locked }} --verbose -- trybuild