From 695de378eb7cfc950f6981974b61488be1763c56 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 3 Dec 2024 09:25:23 +0100 Subject: [PATCH] CI: use actions/setup-python (#1061) Also run tools-test.yml if modified --- .github/workflows/assemble-distro.yml | 5 +++++ .github/workflows/pull-request.yml | 5 +++++ .github/workflows/scan-for-updates.yml | 5 +++++ .github/workflows/test-all.yml | 15 +++++++++++++++ .github/workflows/tools-tests.yml | 9 ++++++++- .github/workflows/update-latest-report.yml | 5 +++++ 6 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/assemble-distro.yml b/.github/workflows/assemble-distro.yml index e2e22d9fb..1d8974abb 100644 --- a/.github/workflows/assemble-distro.yml +++ b/.github/workflows/assemble-distro.yml @@ -47,6 +47,11 @@ jobs: restore-keys: | archives- + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install package distribution tools" run: python -m pip install -r tools/requirements.txt diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9023cfd7c..9b7a26af0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -37,6 +37,11 @@ jobs: with: fetch-depth: 0 + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install package distribution tools" run: python -m pip install -r tools/requirements.txt diff --git a/.github/workflows/scan-for-updates.yml b/.github/workflows/scan-for-updates.yml index 6c299f858..0628f63cb 100644 --- a/.github/workflows/scan-for-updates.yml +++ b/.github/workflows/scan-for-updates.yml @@ -60,6 +60,11 @@ jobs: GAP_PKGS_TO_CLONE: 'crypting json' GAP_PKGS_TO_BUILD: 'crypting json' + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install prerequisites for package distribution tools" run: python -m pip install -r tools/requirements.txt diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 0978bf188..28349d191 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -86,6 +86,11 @@ jobs: restore-keys: | archives- + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install package distribution tools" run: python -m pip install -r tools/requirements.txt @@ -249,6 +254,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install package distribution tools" run: python -m pip install -r tools/requirements.txt @@ -351,6 +361,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: "Install package distribution tools" run: python -m pip install -r tools/requirements.txt diff --git a/.github/workflows/tools-tests.yml b/.github/workflows/tools-tests.yml index d7d24edfb..d809ba3b8 100644 --- a/.github/workflows/tools-tests.yml +++ b/.github/workflows/tools-tests.yml @@ -9,19 +9,26 @@ on: push: paths: - 'tools/*' + - '.github/workflows/tools-test.yml' # modified workflow may affect tools branches: - main pull_request: paths: - 'tools/*' + - '.github/workflows/tools-test.yml' # modified workflow may affect tools jobs: - py39: + py311: name: "Run tests" runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install dependencies run: | python -m pip install -r tools/requirements.txt diff --git a/.github/workflows/update-latest-report.yml b/.github/workflows/update-latest-report.yml index 0dca637db..7e2fb0d84 100644 --- a/.github/workflows/update-latest-report.yml +++ b/.github/workflows/update-latest-report.yml @@ -30,6 +30,11 @@ jobs: name: "Upload report" runs-on: ubuntu-20.04 steps: + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - uses: actions/checkout@v4 - name: "Install package distribution tools"