-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (57 loc) · 1.77 KB
/
pants.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Pants build
on: [pull_request]
jobs:
build:
name: "Run Pants build"
runs-on: ubuntu-20.04
env:
PANTS_CONFIG_FILES: pants.ci.toml
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: pantsbuild/actions/init-pants@v5-scie-pants
# This action bootstraps pants and manages 2-3 GHA caches.
# See: github.com/pantsbuild/actions/tree/main/init-pants/
- name: List environment variables
run: |
echo "${{ env.PY }}"
echo "${{ env.PANTS_PYTHON_INTERPRETER_CONSTRAINTS }}"
- name: Bootstrap Pants
run: |
pants version
- name: Run tailor check
run: |
pants tailor --check ::
- name: Run tests
run: |
pants test ::
- name: Run linters
run: |
pants update-build-files --check ::
pants lint ::
- name: Run type checkers
run: |
pants check ::
- name: Get project version from Pants plugin
run: |
pants project-version ::
pants project-version --as-json cheeseshop:
pants project-version --no-as-json cheeseshop:
- name: Package and check Python wheel
run: |
pants package //:cheeseshop-query-wheel
python3 -m venv .venv
source .venv/bin/activate
pip install dist/*.whl
cheeseshop-query
cheeseshop-query --version
- name: Package and check PEX file
run: |
pants package cheeseshop/cli:cheeseshop-query
dist/**/*.pex --help