gh-actions: move PR checks from static tests to own workflow
This commit is contained in:
parent
e69617a493
commit
44b48e6c2d
15
.github/workflows/check-labels.yml
vendored
15
.github/workflows/check-labels.yml
vendored
@ -1,15 +0,0 @@
|
|||||||
name: check-labels
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, reopened, labeled, unlabeled, synchronize]
|
|
||||||
pull_request_review:
|
|
||||||
types: [submitted, dismissed]
|
|
||||||
jobs:
|
|
||||||
check-labels:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: RIOT-OS/check-labels-action@v1.0.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
unset_labels: 'CI: needs squashing,State: waiting for other PR'
|
|
||||||
cond_labels: '(Process: needs >1 ACK,review.approvals>1),(Area: RDM,review.approvals>2)'
|
|
||||||
39
.github/workflows/check-pr.yml
vendored
Normal file
39
.github/workflows/check-pr.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: check-pr
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, labeled, unlabeled, synchronize]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted, dismissed]
|
||||||
|
jobs:
|
||||||
|
check-labels:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: RIOT-OS/check-labels-action@v1.0.0
|
||||||
|
with:
|
||||||
|
access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
unset_labels: 'CI: needs squashing,State: waiting for other PR'
|
||||||
|
cond_labels: '(Process: needs >1 ACK,review.approvals>1),(Area: RDM,review.approvals>2)'
|
||||||
|
check-commits:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.base_ref }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
check: [commit-msg, pr_check]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
# Use the SHA of the PR branch as-is, not the PR branch merged
|
||||||
|
# in master (default behavior in GH actions)
|
||||||
|
# See https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Fetch base branch
|
||||||
|
run:
|
||||||
|
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}'
|
||||||
|
- name: Run checks
|
||||||
|
env: # enforce deactivation of label check in pr_check
|
||||||
|
TRAVIS_PULL_REQUEST:
|
||||||
|
CI_PULL_NR:
|
||||||
|
run: |
|
||||||
|
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"
|
||||||
2
dist/tools/ci/static_tests.sh
vendored
2
dist/tools/ci/static_tests.sh
vendored
@ -103,7 +103,6 @@ fi
|
|||||||
|
|
||||||
export BASE_BRANCH="${CI_BASE_BRANCH}"
|
export BASE_BRANCH="${CI_BASE_BRANCH}"
|
||||||
|
|
||||||
run ./dist/tools/commit-msg/check.sh "${BASE_BRANCH}"
|
|
||||||
run ./dist/tools/whitespacecheck/check.sh "${BASE_BRANCH}"
|
run ./dist/tools/whitespacecheck/check.sh "${BASE_BRANCH}"
|
||||||
DIFFFILTER="MR" ERROR_EXIT_CODE=0 run ./dist/tools/licenses/check.sh
|
DIFFFILTER="MR" ERROR_EXIT_CODE=0 run ./dist/tools/licenses/check.sh
|
||||||
DIFFFILTER="AC" run ./dist/tools/licenses/check.sh
|
DIFFFILTER="AC" run ./dist/tools/licenses/check.sh
|
||||||
@ -111,7 +110,6 @@ run ./dist/tools/doccheck/check.sh
|
|||||||
run ./dist/tools/externc/check.sh
|
run ./dist/tools/externc/check.sh
|
||||||
run ./dist/tools/cppcheck/check.sh
|
run ./dist/tools/cppcheck/check.sh
|
||||||
run ./dist/tools/vera++/check.sh
|
run ./dist/tools/vera++/check.sh
|
||||||
run ./dist/tools/pr_check/pr_check.sh "${BASE_BRANCH}"
|
|
||||||
run ./dist/tools/coccinelle/check.sh
|
run ./dist/tools/coccinelle/check.sh
|
||||||
run ./dist/tools/flake8/check.sh
|
run ./dist/tools/flake8/check.sh
|
||||||
run ./dist/tools/headerguards/check.sh
|
run ./dist/tools/headerguards/check.sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user