summaryrefslogtreecommitdiffstats
path: root/.github/workflows/coverity.yml
blob: c9e25ebf9fc1bdae99bce411588592235fe2baf7 (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
---
# Runs coverity-scan.sh every 24h on `master`
name: Coverity Scan
on:
  schedule:
    - cron: '0 1 * * *'
  pull_request:
    paths:
      - .github/workflows/coverity.yml
      - coverity-scan.sh
env:
  DO_NOT_TRACK: 1
concurrency:
  group: coverity-${{ github.ref }}
  cancel-in-progress: true
jobs:
  coverity:
    if: github.repository == 'netdata/netdata'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Prepare environment
        env:
          DEBIAN_FRONTEND: 'noninteractive'
        run: |
          ./packaging/installer/install-required-packages.sh \
            --dont-wait --non-interactive netdata
          sudo apt-get install -y libjson-c-dev libipmimonitoring-dev \
                                  libcups2-dev libsnappy-dev libprotobuf-dev \
                                  libprotoc-dev libssl-dev protobuf-compiler \
                                  libnetfilter-acct-dev
      - name: Run coverity-scan
        env:
          REPOSITORY: 'netdata/netdata'
          COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
          COVERITY_SCAN_SUBMIT_MAIL: ${{ secrets.COVERITY_SCAN_SUBMIT_MAIL }}
        run: |
          ./coverity-scan.sh --with-install
      - name: Failure Notification
        uses: rtCamp/action-slack-notify@v2
        env:
          SLACK_COLOR: 'danger'
          SLACK_FOOTER: ''
          SLACK_ICON_EMOJI: ':github-actions:'
          SLACK_TITLE: 'Coverity run failed:'
          SLACK_USERNAME: 'GitHub Actions'
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
        if: ${{
            failure()
            && github.event_name != 'pull_request'
            && startsWith(github.ref, 'refs/heads/master')
          }}