handsome-sunset-98068
09/26/2022, 1:41 PMname: ci
on:
pull_request:
branches:
- develop
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: Perform CI Checks
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Get the latest code
uses: actions/checkout@v3 # checkout latest commit
- name: Cache the artefacts
uses: actions/cache@v3 # cache the pants, test results, pex binaries
id: cache
with:
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Bootstrap Pants
run: |
./pants --version
- name: Check BUILD files
run: ./pants tailor --check update-build-files --check
- name: Lint and typecheck all targets
run: |
./pants fmt lint ::
- name: Test all targets
run: |
./pants test ::
- 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.
polite-garden-50641
09/26/2022, 3:20 PMset -eoxu pipefail
polite-garden-50641
09/26/2022, 3:22 PM~/.cache/pants/setup
will get wiped when you upgrade pants. see: https://github.com/toolchainlabs/remote-api-tools/blob/main/.github/workflows/build.yaml#L24 as an example.handsome-sunset-98068
09/26/2022, 4:52 PMbroad-processor-92400
09/26/2022, 8:06 PM