Skip to content

Commit a01e100

Browse files
authored
Upgrade to Pants 2.15 and to scie-pants. (#20)
1 parent 2e55545 commit a01e100

File tree

6 files changed

+21
-547
lines changed

6 files changed

+21
-547
lines changed

.github/workflows/pants.yaml

+9-7
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ jobs:
2424
python-version: [3.8]
2525
steps:
2626
- uses: actions/checkout@v3
27-
- uses: pantsbuild/actions/init-pants@v2
27+
- uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- uses: pantsbuild/actions/init-pants@v4-scie-pants
2831
# This action bootstraps pants and manages 2-3 GHA caches.
2932
# See: github.com/pantsbuild/actions/tree/main/init-pants/
3033
with:
31-
pants-python-version: ${{ matrix.python-version }}
32-
# cache0 makes it easy to bust the cache if needed
34+
# v0 makes it easy to bust the cache if needed
3335
# just increase the integer to start with a fresh cache
34-
gha-cache-key: cache0-py${{ matrix.python-version }}
36+
gha-cache-key: v0
3537
# The Python backend uses named_caches for Pip/PEX state,
3638
# so it is appropriate to invalidate on lockfile changes.
3739
named-caches-hash: ${{ hashFiles('python-default.lock') }}
@@ -53,12 +55,12 @@ jobs:
5355
echo "PATH=${PATH}:${HOME}/.thrift" >> $GITHUB_ENV
5456
- name: Bootstrap Pants
5557
run: |
56-
./pants --version
58+
pants --version
5759
- name: Check BUILD files
58-
run: ./pants tailor --check update-build-files --check
60+
run: pants tailor --check update-build-files --check
5961
- name: Lint and test
6062
run: |
61-
./pants lint test ::
63+
pants lint test ::
6264
- name: Upload Pants log
6365
uses: actions/upload-artifact@v3
6466
with:

3rdparty/python/default.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This lockfile was autogenerated by Pants. To regenerate, run:
22
//
3-
// ./pants generate-lockfiles --resolve=python-default
3+
// pants generate-lockfiles --resolve=python-default
44
//
55
// --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE ---
66
// {

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
An example repository to demonstrate codegen support in Pants.
44

5+
You run Pants goals using the `pants` launcher binary, which will bootstrap the
6+
version of Pants configured for this repo if necessary.
7+
8+
See [here](https://www.pantsbuild.org/docs/installation) for how to install the `pants` binary.
9+
510
Refer to these docs for more information:
611

712
* [Go Protobuf](https://www.pantsbuild.org/docs/protobuf-go)
@@ -10,13 +15,13 @@ Refer to these docs for more information:
1015

1116
Some commands you can try out:
1217

13-
* `./pants export-codegen ::` - see the generated files.
18+
* `pants export-codegen ::` - see the generated files.
1419
* This isn't necessary for Pants to use the generated files, but can be useful when
1520
debugging or to generate files for IDEs.
16-
* `./pants test ::` - run all tests
17-
* `./pants fmt ::` - format Protobuf with `buf`
18-
* `./pants lint ::` - lint Protobuf with `buf`
19-
* `./pants dependencies <path/to/file>` - see what depends on what
21+
* `pants test ::` - run all tests
22+
* `pants fmt ::` - format Protobuf with `buf`
23+
* `pants lint ::` - lint Protobuf with `buf`
24+
* `pants dependencies <path/to/file>` - see what depends on what
2025

2126
Check out our other [example repositories](https://www.pantsbuild.org/docs/example-repos) to see
2227
other features like packaging binaries.

0 commit comments

Comments
 (0)