coverity.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ---
  2. # Runs coverity-scan.sh every 24h on `master`
  3. name: Coverity Scan
  4. on:
  5. schedule:
  6. - cron: '0 1 * * *'
  7. pull_request:
  8. paths:
  9. - .github/workflows/coverity.yml
  10. - coverity-scan.sh
  11. env:
  12. DISABLE_TELEMETRY: 1
  13. concurrency:
  14. group: coverity-${{ github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. coverity:
  18. if: github.repository == 'netdata/netdata'
  19. runs-on: ubuntu-latest
  20. steps:
  21. - name: Checkout
  22. uses: actions/checkout@v3
  23. id: checkout
  24. with:
  25. submodules: recursive
  26. - name: Prepare environment
  27. id: prepare
  28. env:
  29. DEBIAN_FRONTEND: 'noninteractive'
  30. run: |
  31. ./packaging/installer/install-required-packages.sh \
  32. --dont-wait --non-interactive netdata
  33. sudo apt-get install -y libjson-c-dev libipmimonitoring-dev \
  34. libcups2-dev libsnappy-dev libprotobuf-dev \
  35. libprotoc-dev libssl-dev protobuf-compiler \
  36. libnetfilter-acct-dev
  37. - name: Run coverity-scan
  38. id: run
  39. env:
  40. REPOSITORY: 'netdata/netdata'
  41. COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
  42. COVERITY_SCAN_SUBMIT_MAIL: ${{ secrets.COVERITY_SCAN_SUBMIT_MAIL }}
  43. run: |
  44. bash -x ./coverity-scan.sh --with-install
  45. - name: Failure Notification
  46. uses: rtCamp/action-slack-notify@v2
  47. env:
  48. SLACK_COLOR: 'danger'
  49. SLACK_FOOTER: ''
  50. SLACK_ICON_EMOJI: ':github-actions:'
  51. SLACK_TITLE: 'Coverity run failed:'
  52. SLACK_USERNAME: 'GitHub Actions'
  53. SLACK_MESSAGE: |-
  54. ${{ github.repository }}: Coverity failed to run correctly.
  55. Checkout: ${{ steps.checkout.outcome }}
  56. Environment preparation: ${{ steps.prepare.outcome }}
  57. Coverity run: ${{ steps.run.outcome }}
  58. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  59. if: ${{
  60. failure()
  61. && github.event_name != 'pull_request'
  62. && startsWith(github.ref, 'refs/heads/master')
  63. }}