Fix simplesat build #35
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: simplesat | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
runtime: [3.8, '3.11', pypy3.8] | |
os: [ubuntu-latest, macos-12, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-20.04 | |
runtime: 3.6 | |
runs-on: ${{ matrix.os }} | |
needs: code-lint | |
steps: | |
- name: Clone the source | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.runtime }} | |
- name: Install dev dependencies | |
run: python -m pip install -r dev_requirements.txt | |
- name: Install sat-solver | |
run: python -m pip install -e . | |
- name: Run tests | |
run: coverage run -p -m haas simplesat | |
- name: Upload Coverage info | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{matrix.os}}-${{matrix.runtime}} | |
path: coverage.* | |
build-docs: | |
runs-on: ubuntu-latest | |
needs: run-tests | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install necessary apt-get packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install doc dependencies | |
run: python -m pip install -r doc_requirements.txt | |
- name: Install sat-solver | |
run: python -m pip install . | |
- name: Build docs | |
run: cd docs && make html | |
coverage: | |
runs-on: ubuntu-latest | |
needs: run-tests | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download coverage artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-* | |
merge-multiple: true | |
- name: Install coverage | |
run: pip install coverage | |
- name: Generate coverage report | |
run: | | |
pip install -e . | |
coverage combine | |
coverage report | |
coverage html | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: htmlcov/* | |
code-lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.6 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.6 | |
- name: Install flake8 | |
run: python -m pip install flake8 | |
- name: Lint codebase | |
run: python -m flake8 simplesat/ |