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.