plugins: add deps_group plugin #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Tell Pants to use Python ${{ matrix.python-version }} | |
# https://docs.github.com/en/actions/using-workflows/ | |
# workflow-commands-for-github-actions#setting-an-environment-variable | |
run: | | |
CONSTRAINTS="['==${{ matrix.python-version }}.*']" | |
echo "PY=python${{ matrix.python-version }}" >> $GITHUB_ENV && | |
echo "PANTS_PYTHON_INTERPRETER_CONSTRAINTS=${CONSTRAINTS}" \ | |
>> $GITHUB_ENV | |
- 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 :: | |
- 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 |