File: check.yml

package info (click to toggle)
rust-built 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 280 kB
  • sloc: makefile: 2
file content (88 lines) | stat: -rw-r--r-- 2,846 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Clippy, Format & Test

on: [pull_request, push, workflow_dispatch]

jobs:
  fmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all -- --check
      - run: cargo fmt --manifest-path=example_project/Cargo.toml --all -- --check

  check:
    name: cargo check
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: [stable, "1.81"]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.toolchain }}
      - run: cargo check --no-default-features
      - run: cargo check --no-default-features --features cargo-lock
      - run: cargo check --no-default-features --features dependency-tree
      - run: cargo check --no-default-features --features git2
      - run: cargo check --no-default-features --features semver
      - run: cargo check --no-default-features --features chrono
      - run: cargo check --all-features
      - run: cargo check --manifest-path=example_project/Cargo.toml

  semver_crate:
    name: cargo check of internal crate
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: [stable, "1.83"]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.toolchain }}
      - run: cargo check --manifest-path=semver_check/Cargo.toml

  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 --tests -- -D warnings
      - run: cargo clippy --all-features --all --tests -- -D warnings
      - run: cargo clippy --manifest-path=example_project/Cargo.toml --all --tests -- --warn clippy::pedantic -D warnings

  test:
    name: cargo test
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        toolchain: [stable, nightly]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          targets: x86_64-unknown-none
          toolchain: ${{ matrix.toolchain }}
      - if: matrix.toolchain == 'nightly'
        run: echo "RUSTFLAGS=-Zfmt-debug=none" >> $GITHUB_ENV
      - run: cargo test --no-default-features
      - run: cargo test --all-features
      - run: cargo test -- --ignored nostd_testbox
      - run: cargo run --manifest-path=example_project/Cargo.toml

  semver:
    name: Semver check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: sudo apt update && sudo apt install -y cmake
      - uses: obi1kenobi/cargo-semver-checks-action@v2