diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 434f76ab..bba12a96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: [push, pull_request] jobs: lint-commitlint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -33,10 +33,10 @@ jobs: - name: Check commit message compliance of the pull request if: github.event_name == 'pull_request' run: | - ./run-tests.sh --check-commitlint ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.number }} + ./run-tests.sh --check-commitlint ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.number }} lint-shellcheck: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -47,7 +47,7 @@ jobs: ./run-tests.sh --check-shellcheck lint-black: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -55,7 +55,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Check Python code formatting run: | @@ -63,7 +63,7 @@ jobs: ./run-tests.sh --check-black lint-flake8: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -71,7 +71,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Check compliance with pep8, pyflakes and circular complexity run: | @@ -80,7 +80,7 @@ jobs: ./run-tests.sh --check-flake8 lint-pydocstyle: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -88,7 +88,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Check compliance with Python docstring conventions run: | @@ -96,7 +96,7 @@ jobs: ./run-tests.sh --check-pydocstyle lint-check-manifest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -104,7 +104,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Check Python manifest completeness run: | @@ -112,7 +112,7 @@ jobs: ./run-tests.sh --check-manifest docs-sphinx: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -120,7 +120,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Install system dependencies run: | @@ -137,15 +137,15 @@ jobs: run: ./run-tests.sh --check-sphinx python-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.12" - name: Install Python dependencies run: | @@ -163,7 +163,7 @@ jobs: files: coverage.xml lint-helm: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1240941f..32f7a2d0 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,9 +7,9 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.8" + python: "3.12" sphinx: configuration: docs/conf.py diff --git a/reana/config.py b/reana/config.py index 74ad4edc..fb4889cd 100644 --- a/reana/config.py +++ b/reana/config.py @@ -296,10 +296,10 @@ CODECOV_REANAHUB_URL = "https://codecov.io/gh/reanahub" """REANA Hub organisation Codecov URL.""" -PYTHON_EXECUTABLE_NAME = "python3.8" +PYTHON_EXECUTABLE_NAME = "python3.12" """Python executable name with the same version as cluster components.""" -PYTHON_DOCKER_IMAGE = "docker.io/library/python:3.8" +PYTHON_DOCKER_IMAGE = "docker.io/library/python:3.12" """Python docker image with the same version as cluster components.""" RELEASE_COMMIT_REGEX = re.compile("^(release:|chore.*: release)") diff --git a/reana/reana_dev/utils.py b/reana/reana_dev/utils.py index 1ce74119..6bdc10d7 100644 --- a/reana/reana_dev/utils.py +++ b/reana/reana_dev/utils.py @@ -802,11 +802,11 @@ def _bump_dev_post_pre(dev_post_pre_number): f"{version.major}.{version.minor}.{version.micro}{dev_post_pre_part}" ) elif (part and part == "micro") or (isinstance(version.micro, int) and not part): - next_version = Version(f"{version.major}.{version.minor}.{version.micro+1}") + next_version = Version(f"{version.major}.{version.minor}.{version.micro + 1}") elif (part and part == "minor") or (isinstance(version.minor, int) and not part): - next_version = Version(f"{version.major}.{version.minor+1}.0") + next_version = Version(f"{version.major}.{version.minor + 1}.0") elif (part and part == "major") or (isinstance(version.major, int) and not part): - next_version = Version(f"{version.major+1}.0.0") + next_version = Version(f"{version.major + 1}.0.0") return str(next_version) diff --git a/run-tests.sh b/run-tests.sh index e21ba846..90d707b6 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -19,20 +19,23 @@ check_commitlint () { commit_hash=$(echo "$line" | cut -d ' ' -f 1) commit_title=$(echo "$line" | cut -d ' ' -f 2-) commit_number_of_parents=$(git rev-list --parents "$commit_hash" -n1 | awk '{print NF-1}') + # (i) skip checking release commits generated by Release Please + if [ "$commit_number_of_parents" -le 1 ] && echo "$commit_title" | grep -qP "^chore\(.*\): release"; then + continue + fi + # (ii) check presence of PR number + if ! echo "$commit_title" | grep -qP "\(\#$pr\)$"; then + echo "✖ Headline does not end by '(#$pr)' PR number: $commit_title" + found=1 + fi + # (iii) check absence of merge commits in feature branches if [ "$commit_number_of_parents" -gt 1 ]; then if echo "$commit_title" | grep -qP "^chore\(.*\): merge "; then - break + break # skip checking maint-to-master merge commits else echo "✖ Merge commits are not allowed in feature branches: $commit_title" found=1 fi - elif echo "$commit_title" | grep -qP "^chore\(.*\): release"; then - true - elif echo "$commit_title" | grep -qP "\(\#$pr\)$"; then - true - else - echo "✖ Headline does not end by '(#$pr)' PR number: $commit_title" - found=1 fi done < <(git log "$from..$to" --format="%H %s") if [ $found -gt 0 ]; then diff --git a/setup.py b/setup.py index 23b0453c..8f9827d2 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content",