FreeRTOS-Kernel/.github/workflows/core-checks.yml
Soren Ptak 3a2f6646f0
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* Use new version of CI-CD Actions,  checkout@v3 instead of checkout@v2 on all jobs
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Add in bot formatting action
* Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability
* Add in a Qemu demo onto the workflows.
2023-09-06 12:35:37 -07:00

46 lines
1.3 KiB
YAML

name: Core-Checker
on: [pull_request]
jobs:
core-checker:
name: Check File Headers
runs-on: ubuntu-20.04
steps:
# Install python 3
- name: Tool Setup
uses: actions/setup-python@v2
with:
python-version: 3.7.10
architecture: x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use the checks as defined by the user, so they can locally adjust as needed
- name: Checkout FreeRTOS Tools
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: tools
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: inspect
# Collect all affected files
- name: Collecting changed files
uses: lots0logs/gh-action-get-changed-files@2.1.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Run checks
- name: Check File Headers
run: |
cd inspect
pip install -r .github/scripts/common/requirements.txt
export PYTHONPATH=tools/.github/scripts:${PYTHONPATH}
.github/scripts/core_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
exit $?