Install doc build dependencies #173
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: Alexandria3k CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@main | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv==2023.7.23 | |
cd src && pipenv install --dev | |
- name: Run unit and integration tests | |
run: cd src && pipenv run python -m unittest discover -s .. | |
- name: Check code formatting | |
run: | | |
cd src | |
find . -name '*.py' | xargs pipenv run black -l 79 --check | |
- name: Lint | |
run: | | |
cd src | |
if [ $PYTHON_VER == 3.11 ] ; then find . -name '*.py' | xargs pipenv run python -m pylint --rcfile ../.pylintrc ; fi | |
env: | |
PYTHON_VER: ${{ matrix.python-version }} | |
- name: Install SQLite | |
run: | | |
sudo apt-get install -y sqlite | |
- name: Run SQL unit tests | |
run: | | |
for t in tests/*.rdbu; do rdbunit --database=sqlite $t | sqlite3 ; done | |
- name: Build package | |
run: cd src && pipenv run python -m build .. | |
- name: Create virtual environment for installation | |
run: | | |
pip install virtualenv | |
python -m venv test-a3k | |
- name: Install built package | |
run: | | |
cd test-a3k | |
. bin/activate | |
python3 -m pip install --use-pep517 ../dist/alexandria3k-*.whl | |
- name: Run built package | |
run: | | |
cd test-a3k | |
. bin/activate | |
# As Python module | |
python -m alexandria3k --version | |
# As a command | |
bin/a3k --version | |
- name: Test provided examples | |
run: | | |
cd test-a3k | |
. bin/activate | |
cd ../examples | |
make clean all |