Skip to content

Use pants managed venv in Makefile #1294

Use pants managed venv in Makefile

Use pants managed venv in Makefile #1294

Workflow file for this run

---
name: Validate Pants Metadata
on:
push:
branches:
# only on merges to master branch
- master
# and version branches, which only include minor versions (eg: v3.4)
- v[0-9]+.[0-9]+
tags:
# also version tags, which include bugfix releases (eg: v3.4.0)
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
type: [opened, reopened, edited]
branches:
# Only for PRs targeting those branches
- master
- v[0-9]+.[0-9]+
jobs:
pants-tailor:
name: Make sure pants BUILD files are up-to-date
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# a test uses a submodule, and pants needs access to it to calculate deps.
submodules: 'true'
- name: Initialize Pants and its GHA caches
uses: pantsbuild/actions/init-pants@v8
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
# This action also creates 3 GHA caches (1 is optional).
# - `pants-setup` has the bootsrapped pants install
# - `pants-named-caches` has pip/wheel and PEX caches
# - `pants-lmdb-store` has the fine-grained process cache.
# If we ever use a remote cache, then we can drop this.
# Otherwise, we may need an additional workflow or job to delete old caches
# if they are not expiring fast enough, and we hit the GHA 10GB per repo max.
with:
base-branch: master
# To ignore a bad cache, bump the cache* integer.
gha-cache-key: cache0-BUILD
# This hash should include all of our lockfiles so that the pip/pex caches
# get invalidated on any transitive dependency update.
named-caches-hash: ${{ hashFiles('lockfiles/*.lock') }}
# enable the optional lmdb_store cache since we're not using remote caching.
cache-lmdb-store: 'true'
# install whatever version of python we need for our in-repo pants-plugins
setup-python-for-plugins: 'true'
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Upload pants log
uses: actions/upload-artifact@v4
with:
name: pants-log-py${{ matrix.python-version }}
path: .pants.d/pants.log
if: always() # We want the log even on failures.