From 71b7a7e7a08042605fc34158a98f7037208dafab Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Wed, 24 Jul 2024 16:16:44 +0900 Subject: [PATCH] Patch metadata-validation Github action: add python virtualenv The upstream hardware-metadata-validation action presently fails to install python dependencies with a permissions error for the pip cache directory. Until it's fixed upstream, use a virtualenv. --- .github/workflows/hardware-metadata-validation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index 716cd976277..547567b3890 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -21,6 +21,12 @@ jobs: image: docker.io/zmkfirmware/zmk-dev-arm:3.5 steps: - uses: actions/checkout@v4 + - name: Setup Python virtual environment + 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