Skip to content

Commit

Permalink
try updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
theOehrly committed Jul 31, 2024
1 parent ff0a767 commit ded4bdb
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 76 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Tests

on:
workflow_call:
inputs:
python-version:
required: true
type: string
extra-requirements:
required: false
type: string

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov codecov beautifulsoup4 ${{ inputs.extra-requirements }} -e .
- name: Test with pytest
run: |
pytest --cov=autodocsumm --cov-report=xml tests
- name: Upload codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecov
160 changes: 84 additions & 76 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,87 +8,95 @@ on:
pull_request:

jobs:
build:

runs-on: ubuntu-latest

build-sphinx-8:
name: Build Sphinx 8
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
python-version: [ "3.10", "3.11", "3.12" ]
sphinx-version: [
"8.0.*",
"7.0.*", "7.1.*", "7.2.*",
"6.0.*",
"5.0.*",
"4.5", "4.4", "4.3", "4.2", "4.1", "4.0.*",
"3.5.*", "3.4.*", "3.2.*", "3.1.*", "3.0.*",
]
include:
- python-version: "3.7"
sphinx-version: ""
- python-version: "3.7"
sphinx-version: "3.5"
- python-version: "3.10"
sphinx-version: ""
- python-version: "3.10"
sphinx-version: "4.5"
- python-version: "3.11"
sphinx-version: ""
- python-version: "3.11"
sphinx-version: "4.5"
- python-version: "3.12"
sphinx-version: ""
- python-version: "3.12"
sphinx-version: "4.5"
exclude:
- python-version: "3.8"
sphinx-version: "7.2.*"
- python-version: "3.8"
sphinx-version: "8.0.*"
- python-version: "3.9"
sphinx-version: "8.0.*"
uses: ./.github/workflows/build.yml
with:
python-version: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
env:
SPHINX_VERSION: ${{ matrix.sphinx-version }}
run: |
python -m pip install --upgrade pip
SPHINX=Sphinx
JINJA2=jinja2
SPHINXCONTRIB_PINNED="sphinxcontrib-applehelp<1.0.8 "
SPHINXCONTRIB_PINNED+="sphinxcontrib-devhelp<1.0.6 "
SPHINXCONTRIB_PINNED+="sphinxcontrib-htmlhelp<2.0.5 "
SPHINXCONTRIB_PINNED+="sphinxcontrib-jsmath<1.0.1 "
SPHINXCONTRIB_PINNED+="sphinxcontrib-qthelp<1.0.7 "
SPHINXCONTRIB_PINNED+="sphinxcontrib-serializinghtml<1.1.10 "
EXTRAS=""
if [[ $SPHINX_VERSION != "" ]]; then
SPHINX="${SPHINX}==${SPHINX_VERSION}";
JINJA2="${JINJA2}<3.1";
fi
if [[ $SPHINX_VERSION == 3* || $SPHINX_VERSION == 4* ]]; then
EXTRAS="{$SPHINXCONTRIB_PINNED}";
fi
pip install pytest pytest-cov codecov "${SPHINX}" "${JINJA2}" "${EXTRAS}" beautifulsoup4 -e .
- name: Test with pytest
run: |
pytest --cov=autodocsumm --cov-report=xml tests
- name: Upload codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecov
# build-sphinx-72:
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# python-version: [ "3.9", "3.10", "3.11", "3.12" ]
# sphinx-version: [
# "7.2.*",
# ]
# steps:
# - uses: ./.github/workflows/build.yml
# with:
# python-version: ${{ matrix.python-version }}
#
#
# build-sphinx-5plus:
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
# sphinx-version: [
# "7.0.*", "7.1.*",
# "6.0.*",
# "5.0.*",
# ]
# steps:
# - uses: ./.github/workflows/build.yml
# with:
# python-version: ${{ matrix.python-version }}
#
#
# build-sphinx-4:
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
# sphinx-version: [
# "4.5", "4.4", "4.3", "4.2", "4.1", "4.0.*",
# ]
# steps:
# - uses: ./.github/workflows/build.yml
# with:
# python-version: ${{ matrix.python-version }}
# extra-requirements: "\
# sphinxcontrib-applehelp<1.0.8 \
# sphinxcontrib-devhelp<1.0.6 \
# sphinxcontrib-htmlhelp<2.0.5 \
# sphinxcontrib-jsmath<1.0.1 \
# sphinxcontrib-qthelp<1.0.7 \
# sphinxcontrib-serializinghtml<1.1.10"
#
#
# build-sphinx-3:
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# python-version: [ "3.7", "3.8", "3.9" ]
# sphinx-version: [
# "3.5.*", "3.4.*", "3.2.*", "3.1.*", "3.0.*",
# ]
# uses: ./.github/workflows/build.yml
# with:
# python-version: ${{ matrix.python-version }}
# extra-requirements: "\
# jinja2<3.1 \
# sphinxcontrib-applehelp<1.0.8 \
# sphinxcontrib-devhelp<1.0.6 \
# sphinxcontrib-htmlhelp<2.0.5 \
# sphinxcontrib-jsmath<1.0.1 \
# sphinxcontrib-qthelp<1.0.7 \
# sphinxcontrib-serializinghtml<1.1.10"

0 comments on commit ded4bdb

Please sign in to comment.