Skip to content

Upgrade to pants 2.17.0 #68

Upgrade to pants 2.17.0

Upgrade to pants 2.17.0 #68

Workflow file for this run

name: Test Liga
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'python/liga/**'
- 'liga/**'
- '.github/workflows/test_liga.yml'
- 'pants.toml'
jobs:
build:
name: Perform CI Checks
#env:
# PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
spark-version: [3.2.1, 3.3.1]
exclude:
- python-version: 3.8
spark-version: 3.3.1
- python-version: 3.9
spark-version: 3.2.1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.8
- uses: jodersky/setup-mill@master
with:
mill-version: 0.10.12
- uses: pantsbuild/actions/init-pants@v4-scie-pants
# This action bootstraps pants and manages 2-3 GHA caches.
# See: github.com/pantsbuild/actions/tree/main/init-pants/
with:
# v0 makes it easy to bust the cache if needed
# just increase the integer to start with a fresh cache
gha-cache-key: cache0-py${{ matrix.python-version }}
# The Python backend uses named_caches for Pip/PEX state,
# so it is appropriate to invalidate on lockfile changes.
named-caches-hash: ${{ hashFiles('spark_3_2_1.lock') }}
# If you're not using a fine-grained remote caching service (see https://www.pantsbuild.org/docs/remote-caching),
# then you may also want to preserve the local Pants cache (lmdb_store). However this must invalidate for
# changes to any file that can affect the build, so may not be practical in larger repos.
# A remote cache service integrates with Pants's fine-grained invalidation and avoids these problems.
cache-lmdb-store: 'true' # defaults to 'false'
# Note that named_caches and lmdb_store falls back to partial restore keys which
# may give a useful partial result that will save time over completely clean state,
# but will cause the cache entry to grow without bound over time.
# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to periodically clean it up.
# Alternatively you change gha-cache-key to ignore old caches.
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Run scala tests
run: mill 'liga[2.12].test'
env:
SPARK_VERSION: ${{ matrix.spark-version }}
- name: Run scala assembly
run: mill 'liga[2.12].assembly'
env:
SPARK_VERSION: ${{ matrix.spark-version }}
- name: Run python tests
run: bin/test
env:
SPARK_VERSION: ${{ matrix.spark-version }}