File: ci.yaml

package info (click to toggle)
rust-udisks2 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 604 kB
  • sloc: xml: 511; makefile: 2
file content (71 lines) | stat: -rw-r--r-- 1,748 bytes parent folder | download | duplicates (2)
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
on:
  push:
    branches: [master]
  pull_request:

name: Continuous Integration

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

jobs:
  check:
    name: Check
    #format does not need to run on all platforms
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
      - name: Run check
        run: cargo check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - name: Run clippy
        run: cargo clippy -- -Dwarnigns

  test:
    name: Test Suite
    strategy:
      matrix:
        platform: [ubuntu-latest] # test only on ubuntu, testing on every platform would take too much time and fail too often due to a few flaky test
        rust:
          - 1.80.0 # MSRV
          - stable
          - beta
          - nightly
      #tests should pass on all platforms
    runs-on: ${{ matrix.platform }}
    timeout-minutes: 25
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install ${{ matrix.rust }} toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.rust }}

      - name: Install udisks2
        run: sudo apt-get install -y udisks2

      - name: Build
        continue-on-error: false
        run: cargo build

      - name: Run tests
        continue-on-error: false
        run: cargo test --locked --verbose