Skip to content

Minor Fixes

Minor Fixes #404

name: "Continuous Integration"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
continuous_integration:
name: Continuous Integration
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Repository Checkout
uses: actions/checkout@v3
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python Cache
id: cache
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-CI-${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }}
- name: Dependencies Installation
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install --quiet --upgrade pip
pip install --quiet --upgrade -r requirements.txt
pip install --quiet --upgrade -e .[lint]
pip install --quiet --upgrade -e .[docs]
pip install --quiet --upgrade -e .[package]
pip install --quiet --upgrade -e .[build]
pip install --quiet --upgrade -e .[tests]
- name: Libraries Installation
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt update --quiet --yes
sudo apt-get install --quiet --yes graphviz
elif [ "$RUNNER_OS" == "Windows" ]; then
choco upgrade --limitoutput --yes chocolatey
choco install --limitoutput --yes graphviz
else
brew update
brew install graphviz
fi
- name: Linting
run: |
flake8 .
pylint docs/
pylint pydtmc/
pylint tests/
- name: Documentation
run: |
make -C docs/ doctest SPHINX_OPTS=-an
make -C docs/ linkcheck SPHINX_OPTS=-an
make -C docs/ coverage SPHINX_OPTS=-an
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Testing & Coverage
env:
COVERALLS_SERVICE_NAME: github-actions
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
pytest --capture=no --benchmark-skip --cov=pydtmc tests/
coveralls