docs: add pants install instructions #74
Workflow file for this run
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: CI - Lint Test Package | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Initialize Pants | |
uses: pantsbuild/actions/init-pants@main | |
with: | |
# cache0 makes it easy to bust the cache if needed | |
gha-cache-key: cache0-py-3-10 | |
named-caches-hash: ${{ hashFiles('3rdparty/*.txt') }} | |
- name: Check BUILD files | |
run: "pants tailor --check update-build-files --check ::" | |
- name: Lint | |
# isort fails for some reason, output(fmt) != output(lint) | |
run: | | |
pants lint --only="['black', 'flake8', 'helm', 'helmchart', 'regex-lint', 'docformatter']" :: | |
if: success() || failure() | |
- name: Test | |
if: success() || failure() | |
run: | | |
export PANTS_TEST_USE_COVERAGE=true | |
pants test :: | |
- name: Package | |
if: success() || failure() | |
run: "pants --tag='-arm' package ::" | |
- name: mypy | |
if: success() || failure() | |
run: "pants --tag='-arm' check ::" | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
if: success() || failure() | |
with: | |
files: ./dist/coverage/python/coverage.xml | |
- name: Upload pants log | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pants-log | |
path: .pants.d/pants.log | |
if: always() # We want the log even on failures & cancelling |