Skip to content

pants: upgrade Pants to 2.20.0 #94

pants: upgrade Pants to 2.20.0

pants: upgrade Pants to 2.20.0 #94

Workflow file for this run

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