Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI extensions: Jobs, parallel static analysis, artifacts #83

Merged
merged 5 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 56 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
python-version: ["3.7", "3.9", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install APT depenencies
Expand Down Expand Up @@ -50,39 +50,78 @@ jobs:
run: |
coverage xml
coverage report -m
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v4
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}

static-analysis:
flake8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 mypy
pip install flake8
pip install -r requirements.txt
- name: Check code style with flake8
run: |
flake8

mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
pip install -r requirements.txt
- name: Check typing with MyPy
run: |
mypy
- name: Check code style with flake8

docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
flake8
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build HTML docs with Sphinx
run: |
cd docs
sphinx-build -M html . _build
- name: Archive built package as artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: |
docs/_build/html

package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
Expand All @@ -92,3 +131,9 @@ jobs:
- name: Create source and wheel dist
run: |
python -m build
- name: Archive built package as artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ types-MarkupSafe>=1.1,<3
types-Jinja2>=2.11,<3

# Documentation
sphinx~=4.0
sphinx-rtd-theme~=1.0
sphinx-toolbox~=2.15
sphinx~=5.0
sphinx-rtd-theme~=2.0
sphinx-toolbox~=3.5
sphinxcontrib-httpdomain~=1.8