Skip to content

Test without numpy and other optional dependencies #33

Test without numpy and other optional dependencies

Test without numpy and other optional dependencies #33

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
include:
- python-version: 3.10
with-numpy: true
- python-version: 3.11
with-numpy: false
- python-version: 3.12
with-numpy: true
max-parallel: 8
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: proudust/gh-describe@v2
# id needed to generate the outputs
id: ghd
- name: Check outputs
run: |
echo "describe : ${{ steps.ghd.outputs.describe }}"
echo "tag : ${{ steps.ghd.outputs.tag }}"
echo "distance : ${{ steps.ghd.outputs.distance }}"
echo "sha : ${{ steps.ghd.outputs.sha }}"
echo "short-sha : ${{ steps.ghd.outputs.short-sha }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
export RO_JSON_GIT_DESCRIBE=${{ steps.ghd.outputs.describe }}
python -m pip install --upgrade pip
pip install setuptools pytest pathlib
if [ "${{ matrix.with-numpy }}" = "true" ]; then
pytz numpy pandas
fi
- name: Install package
run: |
export RO_JSON_GIT_DESCRIBE=${{ steps.ghd.outputs.describe }}
python -m pip install . -vvv
- name: Run tests
run: |
export RO_JSON_GIT_DESCRIBE=${{ steps.ghd.outputs.describe }}
python --version
pip check
pytest -v --strict