Update to syn 2.0 #189
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: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
- release/* | |
jobs: | |
cargo-test: | |
name: cargo test (${{ matrix.os }} / ${{ matrix.rust-version }} / ${{ matrix.runtime }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust-version: [1.59.0, beta, nightly] | |
runtime: [runtime-tokio, runtime-agnostic] | |
include: | |
- rust-version: nightly | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- name: Run cargo test | |
continue-on-error: ${{ matrix.continue-on-error || false }} | |
run: | | |
cargo +${{ matrix.rust-version }} test --workspace --no-default-features --features ${{ matrix.runtime }} | |
cargo-audit: | |
name: cargo audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/audit-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
cargo-clippy: | |
name: cargo clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- id: install-rust | |
name: Install Rust toolchain | |
uses: dtolnay/[email protected] | |
with: | |
components: clippy | |
- name: Run cargo clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
toolchain: ${{ steps.install-rust.outputs.name }} | |
args: --all-targets --features proposed -- -D warnings | |
cargo-fmt: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- id: install-rust | |
name: Install Rust toolchain | |
uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- name: Run cargo fmt | |
run: cargo +${{ steps.install-rust.outputs.name }} fmt --all -- --check |