diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 962cdd35..2de1a247 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,9 +10,6 @@ on: permissions: contents: read -env: - MIN_PYTHON_VERSION: "3.10" - jobs: test: runs-on: ubuntu-latest @@ -22,7 +19,7 @@ jobs: - name: Setup Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} + python-version-file: '.python-version' - name: Install dependencies run: | @@ -45,7 +42,7 @@ jobs: - name: Set up Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} + python-version-file: '.python-version' - name: Install dependencies run: | @@ -74,7 +71,7 @@ jobs: - name: Set up Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} + python-version-file: '.python-version' - name: publish brew run: | sleep 5m diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3629554..680a9f45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,20 +12,22 @@ permissions: contents: read env: - MIN_PYTHON_VERSION: "3.10" + PREK_VERSION: '0.2.11' jobs: - pre-commit: + prek: runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} - - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + python-version-file: '.python-version' + - uses: j178/prek-action@91fd7d7cf70ae1dee9f4f44e7dfa5d1073fe6623 # v1.0.11 + with: + prek-version: ${{ env.PREK_VERSION }} ci: - needs: pre-commit + needs: prek runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -34,7 +36,7 @@ jobs: - name: Setup Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} + python-version-file: '.python-version' - name: Install dependencies run: | @@ -53,7 +55,7 @@ jobs: make type-check python-version: - needs: pre-commit + needs: prek if: github.event_name == 'pull_request' runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/update-bundle-report.yml b/.github/workflows/update-bundle-report.yml index 9ea69307..064db745 100644 --- a/.github/workflows/update-bundle-report.yml +++ b/.github/workflows/update-bundle-report.yml @@ -21,7 +21,7 @@ jobs: - name: Setup python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: ${{ env.MIN_PYTHON_VERSION }} + python-version-file: '.python-version' - name: Install dependencies run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b5cdca9..b52ae77e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ repos: - repo: https://github.com/rhysd/actionlint - rev: v1.7.7 + rev: v1.7.8 hooks: - id: actionlint-docker - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.0 + rev: v0.14.2 hooks: - id: ruff-check files: ^(cloudsplaining/|setup.py) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3a443356..cb65204a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -r requirements.txt # CI -pre-commit==4.3.0 +prek==0.2.11 # Unit testing pytest==8.4.2 coverage==7.10.7