Update run-tests.yml #16
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.6, 3.8, 3.11, pypy3.8] | |
os: [ubuntu-20.04, macos-12, macos-latest, windows-2019] | |
exclude: | |
- os: macos-latest | |
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 . | |
- name: Run tests | |
run: haas simplesat | |
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/ |