diff --git a/.github/workflows/format-command.yml b/.github/workflows/format-command.yml index 1ba3b38f35c..6fa80bb5b29 100644 --- a/.github/workflows/format-command.yml +++ b/.github/workflows/format-command.yml @@ -33,15 +33,15 @@ jobs: ref: ${{ github.event.client_payload.pull_request.head.ref }} persist-credentials: true - # Setup Python environment - - name: Set up Python and install dependencies - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.14' - pip-install: ruff prek # zizmor: ignore[misfeature] - - name: List installed packages - run: python -m pip list + - name: Install formatting tools + run: | + python -m pip install ruff prek + python -m pip list # Run "make format" and commit the change to the PR branch - name: Commit to the PR branch if any changes diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index b427c91abd3..8a034c69125 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -49,11 +49,13 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Set up Python and install dependencies - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.14' - pip-install: build # zizmor: ignore[misfeature] + + - name: Install dependencies + run: python -m pip install build # This step is only necessary for testing purposes and for TestPyPI - name: Fix up version string for TestPyPI diff --git a/.github/workflows/style_checks.yaml b/.github/workflows/style_checks.yaml index c21637eda72..8679c979e53 100644 --- a/.github/workflows/style_checks.yaml +++ b/.github/workflows/style_checks.yaml @@ -30,14 +30,15 @@ jobs: with: persist-credentials: false - - name: Set up Python and install dependencies - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.14' - pip-install: ruff prek # zizmor: ignore[misfeature] - - name: List installed packages - run: python -m pip list + - name: Install packages + run: | + python -m pip install ruff prek + python -m pip list - name: Formatting check (Ruff + prek) run: | diff --git a/.github/workflows/type_checks.yml b/.github/workflows/type_checks.yml index db1bcdef571..8deb69ab243 100644 --- a/.github/workflows/type_checks.yml +++ b/.github/workflows/type_checks.yml @@ -41,19 +41,18 @@ jobs: # Setup Python - name: Set up Python - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.14' + + - name: Install packages + run: | # Need to install following packages: # 1. required packages # 2. type checker and stub packages # 3. other packages that are used somewhere in PyGMT - pip-install: | # zizmor: ignore[misfeature] - numpy pandas xarray packaging - mypy pandas-stubs pyarrow-stubs - - - name: List install packages - run: python -m pip list + python -m pip install numpy pandas xarray packaging mypy pandas-stubs pyarrow-stubs + python -m pip list - name: Static type check run: make typecheck