Skip to content

rust-next

rust-next #18

Workflow file for this run

name: rust-next
on:
schedule:
- cron: '1 1 1 * *'
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
rust: ["stable", "beta"]
include:
- os: ubuntu-latest
rust: "nightly"
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Install Rust (stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Rust (MSRV)
uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0 # MSRV
profile: minimal
override: true
- name: Install Rust (base)
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo test --no-run --workspace --all-features
- name: Default features
run: cargo test --workspace
- name: All features
run: cargo test --workspace --all-features
- name: No-default features
run: cargo test --workspace --no-default-features
- name: Run script tests
if: runner.os != 'Windows'
run: |
# Run twice to test problem with expression caching
./tests/scripts/test-runner.sh
./tests/scripts/test-runner.sh
(cd tests/scripts/ignores-rust-toolchain && ../../../target/debug/rust-script test.rs)
rustfmt:
name: rustfmt
strategy:
matrix:
rust:
- stable
- beta
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: clippy
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- stable
continue-on-error: ${{ matrix.rust != '1.65.0' }} # MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets -- -D warnings --allow deprecated