Skip to content

Upgrade rust toolchain installer in github actions #99

Upgrade rust toolchain installer in github actions

Upgrade rust toolchain installer in github actions #99

Workflow file for this run

name: Continuous integration
on: [push, pull_request]
jobs:
Test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- 1.63.0 # MSRV
- stable
- nightly
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Install ${{ matrix.rust }} toolchain"
uses: dtolnay/rust-toolchain@${{ matrix.rust }}

Check failure on line 19 in .github/workflows/rust.yml

View workflow run for this annotation

GitHub Actions / Continuous integration

Invalid workflow file

The workflow is not valid. .github/workflows/rust.yml (Line: 19, Col: 15): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.rust
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- name: Run tests
run: RUST_LOG=debug bash contrib/test.sh
Format:
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Install nightly toolchain"
uses: actions-rs/toolchain@nightly
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: "Run formatting check"
run: cargo fmt --all -- --check
Lint:
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Install nightly toolchain"
uses: actions-rs/toolchain@nightly
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- name: "Install clippy"
run: rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu
- name: "Run linting"
run: bash contrib/lint.sh