summaryrefslogtreecommitdiffstats
path: root/.github/workflows/commit-workflow-optional.yml
blob: 318157576bebe970d5accc4c8175f8964c0d58a1 (plain)
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
89
name: commit-workflow-optional

on:
  workflow_dispatch:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  cargo-audit:
    name: Run cargo audit
    runs-on: Ubuntu-20.04

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Cargo audit
        uses: actions-rs/cargo@v1
        # https://github.com/marketplace/actions/rust-cargo
        with:
          command: audit

  cargo-outdated:
    name: Run cargo outdated
    runs-on: Ubuntu-20.04

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Enable cache
        # https://github.com/marketplace/actions/rust-cache
        uses: Swatinem/rust-cache@v1

      - name: Cargo outdated --version
        uses: actions-rs/cargo@v1
        # https://github.com/marketplace/actions/rust-cargo
        with:
          command: outdated
          args: --version

      - name: Cargo outdated
        uses: actions-rs/cargo@v1
        # https://github.com/marketplace/actions/rust-cargo
        with:
          command: outdated

### Disable cargo-tarpaulin as some tests failed only in this step
#  cargo-tarpaulin:
#    name: Run cargo tarpaulin
#    runs-on: Ubuntu-20.04
#
#    steps:
#      - name: Checkout
#        uses: actions/checkout@v2
#
#      - name: Install rust v1.58.1
#        uses: actions-rs/toolchain@v1
#        with:
#          toolchain: 1.58.1
#          override: true
#
#      - name: Enable cache
#        # https://github.com/marketplace/actions/rust-cache
#        uses: Swatinem/rust-cache@v1
#
#      - name: install libssl
#        run: sudo apt install libssl-dev
#
#      - name: Cargo install tarpaulin
#        uses: actions-rs/cargo@v1
#        # https://github.com/marketplace/actions/rust-cargo
#        with:
#          command: install
#          args: cargo-tarpaulin
#
#      - name: Cargo tarpaulin
#        uses: actions-rs/cargo@v1
#        # https://github.com/marketplace/actions/rust-cargo
#        with:
#          command: tarpaulin
#          args: --skip-clean --avoid-cfg-tarpaulin -v --out Xml
#
#      - name: Upload to codecov.io
#        uses: codecov/codecov-action@v1
#        with:
#          token: ${{secrets.CODECOV_TOKEN}}