Skip to content

Commit

Permalink
a: change
Browse files Browse the repository at this point in the history
change

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi committed Oct 1, 2024
1 parent 7ffab75 commit f1314b1
Showing 1 changed file with 6 additions and 79 deletions.
85 changes: 6 additions & 79 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,13 @@ jobs:
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout sources
uses: nrfconnect/action-checkout-west-update@main
- name: Checkout the code
uses: actions/checkout@v4
with:
git-fetch-depth: 0
git-ref: ${{ github.event.pull_request.head.sha }}

- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip

- name: Install python dependencies
working-directory: ncs/nrf
run: |
pip3 install -U pip
pip3 install -U setuptools
pip3 install -U wheel
grep -E "^python-magic|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
grep -E "^west" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
pip3 show -f west
path: ncs/nrf
#ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false

- name: Run merge commits test
env:
Expand All @@ -47,62 +33,3 @@ jobs:
# debug
echo "Git log:"
git log --pretty=oneline | head -n 10
- name: Run CODEOWNERS test
id: codeowners
env:
BASE_REF: ${{ github.base_ref }}
working-directory: ncs/nrf
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
run: |
./scripts/ci/codeowners.py -c origin/${BASE_REF}..
- name: Run Compliance Tests
continue-on-error: true
id: compliance
env:
BASE_REF: ${{ github.base_ref }}
working-directory: ncs/nrf
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
run: |
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
# debug
ls -la
git log --pretty=oneline | head -n 10
# For now we run KconfigBasic, but we should transition to Kconfig
$ZEPHYR_BASE/scripts/ci/check_compliance.py --annotate -e Kconfig \
-e KconfigBasicNoModules -c origin/${BASE_REF}..
- name: upload-results
uses: actions/upload-artifact@v3
continue-on-error: true
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
with:
name: compliance.xml
path: ncs/nrf/compliance.xml

- name: check-warns
working-directory: ncs/nrf
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
run: |
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
if [[ ! -s "compliance.xml" ]]; then
exit 1;
fi
files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
for file in "${files[@]}"; do
f="${file}.txt"
if [[ -s $f ]]; then
errors=$(cat $f)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=${f}::$errors"
exit=1
fi
done
if [ "${exit}" == "1" ]; then
exit 1;
fi

0 comments on commit f1314b1

Please sign in to comment.