File: rust.yml

package info (click to toggle)
rust-tower-lsp-server 0.22.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 516 kB
  • sloc: makefile: 2
file content (69 lines) | stat: -rw-r--r-- 1,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Rust CI

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  cargo-test:
    name: cargo test ${{ matrix.os }}-${{ matrix.rust-version }}-${{ matrix.runtime }})
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
        rust-version: [1.85.0, nightly]
        runtime: [runtime-tokio, runtime-agnostic]

    steps:
    - uses: actions/checkout@v4

    - uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust-version }}

    - name: test with runtime ${{ matrix.runtime }}
      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@v4

    - run: cargo install --locked cargo-audit

    - run: cargo audit

  cargo-clippy:
    name: cargo clippy
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - uses: dtolnay/rust-toolchain@stable
      with:
        components: clippy

    - run: cargo clippy --all-targets --features proposed -- -D warnings

  cargo-fmt:
    name: cargo fmt
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt

    - name: Run cargo fmt
      run: cargo fmt --all -- --check