CI #86
Workflow file for this run
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
# 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: CI | |
# Triggers the workflow on push or pull request events | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '2 1 3 * *' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
# include: | |
# - os: ubuntu-latest | |
# python-version: 'pypy3.9' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade setuptools pip wheel | |
- name: Build and install | |
run: | | |
python -m pip install .[test] | |
- name: Test with pytest | |
run: | | |
python -c "\ | |
import sys, epr, numpy as np;\ | |
print('PyEPR: %s' % epr.__version__);\ | |
print('EPR API: %s' % epr.EPR_C_API_VERSION);\ | |
print('Numpy: %s' % np.__version__);\ | |
print('Python: %s' % sys.version)" | |
pytest -v .. | |
working-directory: doc | |
syslibs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y install libepr-api-dev | |
python -m pip install --upgrade setuptools pip wheel | |
python -m pip install --upgrade wcwidth | |
- name: Build and install | |
env: | |
PYEPR_EPRAPI_SRC: "" | |
run: | | |
python -m pip install .[test] | |
- name: Test with pytest | |
run: | | |
python -c "\ | |
import sys, epr, numpy as np;\ | |
print('PyEPR: %s' % epr.__version__);\ | |
print('EPR API: %s' % epr.EPR_C_API_VERSION);\ | |
print('Numpy: %s' % np.__version__);\ | |
print('Python: %s' % sys.version)" | |
pytest -v .. | |
working-directory: doc | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.11] | |
env: | |
OS: ubuntu-latest | |
PYTHON: '3.11' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade setuptools pip wheel | |
python -m pip install -r requirements-dev.txt | |
- name: Build and install | |
run: | | |
make coverage | |
- name: Print info | |
run: | | |
env PYTHONPATH=src python -c "\ | |
import sys, epr, numpy as np;\ | |
print('PyEPR: %s' % epr.__version__);\ | |
print('EPR API: %s' % epr.EPR_C_API_VERSION);\ | |
print('Numpy: %s' % np.__version__);\ | |
print('Python: %s' % sys.version)" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
env_vars: OS,PYTHON | |
verbose: true |