Skip to content

⬆ Bump actions/cache from 3 to 4 #177

⬆ Bump actions/cache from 3 to 4

⬆ Bump actions/cache from 3 to 4 #177

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
- name: Set up 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
run: |
make lint
- name: Test
run: |
make test
- name: Package
run: |
make build
- name: Validate package
run: |
ls dist
PACKAGE=`ls dist/jsf-*.tar.gz`
# Validate the CLI works
pip3 install $PACKAGE\[cli\]
jsf --help
# Validate the sdist tests work for conda
tar -xvf $PACKAGE
cd jsf-*
pip install .
PACKAGE_DIR=`pip show jsf | grep "Location" | sed 's/^.*: //'`
cd $PACKAGE_DIR/jsf
pip install pytest pyjwt
pytest
- name: Upload coverage
uses: codecov/codecov-action@v3
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.