Skip to content

Commit

Permalink
Add a header check to the CI Fix rucio#4980
Browse files Browse the repository at this point in the history
The `add_header` script needs to be run after an edit to determine the status of
the header and, if necessary, change the header.

This commit adds the check for the header to the CI/CD. This enforces the usage
of the `add_header` script and ensures a healthy code base.
  • Loading branch information
Joel Dierkes committed Dec 16, 2021
1 parent d59c237 commit 5b1fb84
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/autotest.yml
Expand Up @@ -5,7 +5,22 @@ on:
- push

jobs:
add_header_test:
if: 'github.event_name == ''pull_request'''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
for file in $(find . -type f -name '*.py')
do
tools/add_header --disable-add-me -cd -- $file
done
tools/add_header --disable-add-me -cd -- bin/*
setup:
if: ${{ success() || cancelled() }}
needs: add_header_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 5b1fb84

Please sign in to comment.