codeing_guildelines.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: Coding Guidelines
  4. on:
  5. # will be triggered on PR events
  6. pull_request:
  7. # allow to be triggered manually
  8. workflow_dispatch:
  9. # Cancel any in-flight jobs for the same PR/branch so there's only one active
  10. # at a time
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. # Cancel any in-flight jobs for the same PR/branch so there's only one active
  16. # at a time
  17. cancel_previous:
  18. runs-on: ubuntu-latest
  19. steps:
  20. - name: Cancel Workflow Action
  21. uses: styfle/cancel-workflow-action@0.6.0
  22. with:
  23. access_token: ${{ github.token }}
  24. complinace_job:
  25. needs: cancel_previous
  26. runs-on: ubuntu-latest
  27. steps:
  28. - name: checkout
  29. uses: actions/checkout@v2
  30. with:
  31. fetch-depth: 0
  32. # github.event.pull_request.base.label = ${{github.repository}}/${{github.base_ref}}
  33. - name: Run Coding Guidelines Checks
  34. run: /usr/bin/env python3 ./ci/coding_guidelines_check.py --commits ${{ github.event.pull_request.base.sha }}..HEAD