File: rust.yml

package info (click to toggle)
rust-robust 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,204 kB
  • sloc: makefile: 2
file content (61 lines) | stat: -rw-r--r-- 1,508 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
name: Run tests

on:
  push:
    branches:
      - master
      - main
      - staging
      - trying
      - release/**
  pull_request:
  merge_group:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  robust:
    name: robust
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - run: cargo install cargo-all-features
      - run: cargo build-all-features --verbose --examples
      - run: cargo test-all-features

  check:
    name: robust Rustfmt and Clippy check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Check formatting using Rustfmt
        run: cargo fmt --check
      - name: Lint using Clippy
        run: cargo clippy --tests

  all_checks_complete:
    needs:
      - robust
      - check
    if: always()
    runs-on: ubuntu-latest
    steps:
      - name: Result
        run: |
          jq -C <<< "${needs}"
          # Check if all needs were successful or skipped.
          "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
        env:
          needs: ${{ toJson(needs) }}