From a8fb78e0744b6c55ecd610623ae972d0ba697e4a Mon Sep 17 00:00:00 2001 From: nshadskiy <51320024+nshadskiy@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:54:12 +0200 Subject: [PATCH 1/3] Update checks.yml Ubuntu 20.04 is now deprecated. Due to that the check was failing. --- .github/workflows/checks.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a3a7d77..0a281ff 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,20 +10,30 @@ on: jobs: python_format: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: - image: rootproject/root:6.26.00-ubuntu20.04 + image: rootproject/root:6.32.00-ubuntu24.04 options: --user 0 # run as root steps: + - uses: actions/checkout@v3 + - name: apt update run: apt-get -y update - name: Install missing software - run: apt-get install -y git python3-pip && pip install black==24.4.2 - - - uses: actions/checkout@v2 + run: apt-get install -y git python3-pip python3-venv + - name: Create venv + shell: bash + run: | + cd $GITHUB_WORKSPACE + python3 -m venv venv + source venv/bin/activate + pip install black==24.4.2 - name: Check Python formatting shell: bash - run: cd $GITHUB_WORKSPACE && bash scripts/python-formatting.sh + run: | + cd $GITHUB_WORKSPACE + source venv/bin/activate + bash scripts/python-formatting.sh From 5f816ad8537848b9e83f62bc6705d45f6bf30b3f Mon Sep 17 00:00:00 2001 From: nshadskiy <51320024+nshadskiy@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:55:34 +0200 Subject: [PATCH 2/3] Update python-formatting.sh --- scripts/python-formatting.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/python-formatting.sh b/scripts/python-formatting.sh index 5aa1169..286f35d 100644 --- a/scripts/python-formatting.sh +++ b/scripts/python-formatting.sh @@ -2,7 +2,7 @@ FOUND_ISSUE=0 -for FILENAME in $(find . -path ./law -prune -o -name "*.py"); do +for FILENAME in $(find . \( -path ./venv -o -path ./law \) -prune -o -name "*.py"); do # only run the check if the filename ends with .py if [[ ${FILENAME} == *.py ]]; then echo "Checking ${FILENAME}" From fd8d6f3ac87e89bdf61c3955e6b068a900a5ce66 Mon Sep 17 00:00:00 2001 From: nshadskiy <51320024+nshadskiy@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:57:52 +0200 Subject: [PATCH 3/3] Update checks.yml --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0a281ff..930fe48 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -31,6 +31,7 @@ jobs: python3 -m venv venv source venv/bin/activate pip install black==24.4.2 + - name: Check Python formatting shell: bash run: |