Remove test/__init__.py #93
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
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '2 1 3 * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
PACKAGE: pyepr | |
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 build dependencies | |
run: | | |
python -m pip install --upgrade setuptools pip build twine | |
- name: Build package | |
run: | | |
python -m build | |
python -m twine check dist/* | |
- name: Install | |
shell: bash | |
run: | | |
WHEELNAME=$(ls dist/${PACKAGE}-*.whl) | |
python -m pip install ${WHEELNAME} | |
- name: Install test dependencies | |
run: | | |
python -m pip install pytest | |
- 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)" | |
python -m pytest -v ../tests/test_all.py | |
working-directory: dist | |
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 build twine | |
python -m pip install --upgrade wcwidth | |
- name: Build package | |
run: | | |
python -m build | |
python -m twine check dist/* | |
- name: Install | |
shell: bash | |
env: | |
PYEPR_EPRAPI_SRC: "" | |
run: | | |
WHEELNAME=$(ls dist/${PACKAGE}-*.whl) | |
python -m pip install ${WHEELNAME} | |
- name: Install test dependencies | |
run: | | |
python -m pip install pytest | |
- 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)" | |
python -m pytest -v ../tests/test_all.py | |
working-directory: dist | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.11] | |
env: | |
OS: ubuntu-latest | |
PYTHON: '3.12' | |
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 | |
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 |