Create scorecard.yml #35
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: Pytest and Sphinx | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install Python dependencies | |
run: | | |
pip install .[dev] | |
- name: Run pytest | |
run: | | |
pytest -v -cov --junitxml=report.xml | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: pytest-results | |
path: report.xml | |
test-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install Graphviz | |
shell: bash | |
run: | | |
sudo apt-get -y install graphviz | |
- name: Install Python dependencies | |
run: | | |
pip install .[doc] | |
- name: Build documentation | |
working-directory: documentation | |
run: | | |
sphinx-apidoc \ | |
--full \ | |
--doc-project "cimpy" \ | |
--separate \ | |
--output-dir "." \ | |
"../" | |
python3 set_inheritance_diagram.py | |
make html | |
touch _build/html/.nojekyll | |
ls -l _build/html |