Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,31 @@ 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
run: apt-get install -y git python3-pip python3-venv

- uses: actions/checkout@v2
- 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
2 changes: 1 addition & 1 deletion scripts/python-formatting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down