Streamlined the action for PyPI publication. #156
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: Test the library | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
name: Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Specify gypsum cache | |
run: | | |
LOCATION=$(pwd)/.gypsum_cache | |
mkdir -p ${LOCATION} # TODO: move to gypsum_client | |
echo "GYPSUM_CACHE_DIR=${LOCATION}" >> $GITHUB_ENV | |
- name: Cache gypsum assets | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.GYPSUM_CACHE_DIR }} | |
key: gypsum-cache | |
- name: Get latest CMake | |
uses: lukka/get-cmake@latest | |
- name: Test with tox | |
run: | | |
pip install tox | |
tox |