Skip to content

Commit f0f6454

Browse files
authored
Upgrade to pants 2.14.0. (pantsbuild#111)
- Change lockfile name to match emerging conventions - Pin to a more recent Python minor version - Update to latest pants script - Use tagged version of pants setup action
1 parent eb31af6 commit f0f6454

File tree

6 files changed

+509
-173
lines changed

6 files changed

+509
-173
lines changed

.github/workflows/pants.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
python-version: [3.7]
24+
python-version: [3.9]
2525
steps:
26-
- uses: actions/checkout@v2
27-
- uses: pantsbuild/actions/init-pants@c0ce05ee4ba288bb2a729a2b77294e9cb6ab66f7
26+
- uses: actions/checkout@v3
27+
- uses: pantsbuild/actions/init-pants@v1
2828
# This action bootstraps pants and manages 2-3 GHA caches.
2929
# See: github.com/pantsbuild/actions/tree/init-pants/
3030
# We use an action SHA because there are no tags yet.
@@ -34,7 +34,7 @@ jobs:
3434
gha-cache-key: cache0-py${{ matrix.python-version }}
3535
# The Python backend uses named_caches for Pip/PEX state,
3636
# so it is appropriate to invalidate on lockfile changes.
37-
named-caches-hash: ${{ hashFiles('lockfile.txt') }}
37+
named-caches-hash: ${{ hashFiles('python-default.lock') }}
3838
# If you're not using a fine-grained remote caching service (see https://www.pantsbuild.org/docs/remote-caching),
3939
# then you may also want to preserve the local Pants cache (lmdb_store). However this must invalidate for
4040
# changes to any file that can affect the build, so may not be practical in larger repos.
@@ -47,7 +47,7 @@ jobs:
4747
# Alternatively you change gha-cache-key to ignore old caches.
4848

4949
- name: Setup Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v1
50+
uses: actions/setup-python@v4
5151
with:
5252
python-version: ${{ matrix.python-version }}
5353
- name: Check BUILD files
@@ -64,7 +64,7 @@ jobs:
6464
./pants package ::
6565
./pants run helloworld/main.py
6666
- name: Upload pants log
67-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v3
6868
with:
6969
name: pants-log
7070
path: .pants.d/pants.log

lockfile.txt

-131
This file was deleted.

0 commit comments

Comments
 (0)