Patch metadata-validation Github action: use external python #61
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: Hardware Metadata Validation | |
on: | |
push: | |
paths: | |
- ".github/workflows/hardware-metadata-validation.yml" | |
- "schema/hardware-metadata.schema.json" | |
- "app/boards/**/*.zmk.yml" | |
- "app/scripts/west_commands/metadata.py" | |
pull_request: | |
paths: | |
- ".github/workflows/hardware-metadata-validation.yml" | |
- "schema/hardware-metadata.schema.json" | |
- "app/boards/**/*.zmk.yml" | |
- "app/scripts/west_commands/metadata.py" | |
jobs: | |
validate-metadata: | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/zmkfirmware/zmk-dev-arm:3.5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Take ownership of /github/home (temporary patch) | |
run: chown -R $(whoami) /github/home | |
- name: Install python environment (temporary patch) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Setup Python virtual environment (temporary patch) | |
run: | | |
python3 -m venv /tmp/venv | |
source /tmp/venv/bin/activate | |
echo VIRTUAL_ENV="$VIRTUAL_ENV" >> $GITHUB_ENV | |
echo PATH="$PATH" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: pip install -r app/scripts/requirements.txt | |
- name: West init | |
run: west init -l app | |
- name: Update modules (west update) | |
run: west update | |
- name: Export Zephyr CMake package (west zephyr-export) | |
run: west zephyr-export | |
- name: Validate Hardware Metadata | |
working-directory: app | |
run: west metadata check |