Add environmental module #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compliance | |
on: pull_request | |
jobs: | |
compliance_job: | |
runs-on: ubuntu-22.04 | |
name: Run compliance checks on patch series (PR) | |
container: ghcr.io/zephyrproject-rtos/ci:v0.26.12 | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
with: | |
path: thingy91x-oob | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Initialize | |
working-directory: thingy91x-oob | |
run: | | |
west init -l . | |
west update -o=--depth=1 -n | |
- name: Run Compliance Tests | |
continue-on-error: true | |
id: compliance | |
shell: bash | |
env: | |
BASE_REF: ${{ github.base_ref }} | |
working-directory: thingy91x-oob | |
run: | | |
export ZEPHYR_BASE="../zephyr" | |
$ZEPHYR_BASE/scripts/ci/check_compliance.py -m Codeowners -m Devicetree -m Gitlint -m Identity -m Nits -m pylint -m checkpatch -m KconfigBasic -c origin/${BASE_REF}.. | |
- name: check-warns | |
working-directory: thingy91x-oob | |
shell: bash | |
run: | | |
if [[ ! -s "compliance.xml" ]]; then | |
exit 1; | |
fi | |
- name: check-warns | |
working-directory: thingy91x-oob | |
shell: bash | |
run: | | |
for file in Nits.txt checkpatch.txt Identity.txt Gitlint.txt pylint.txt Devicetree.txt Kconfig.txt KconfigBasic.txt Codeowners.txt; do | |
if [[ -s $file ]]; then | |
errors=$(cat $file) | |
errors="${errors//'%'/'%25'}" | |
errors="${errors//$'\n'/'%0A'}" | |
errors="${errors//$'\r'/'%0D'}" | |
echo "::error file=${file}::$errors" | |
exit=1 | |
fi | |
done | |
if [[ $exit == 1 ]]; then | |
exit 1 | |
fi |