-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a97e95
commit 575c62b
Showing
23 changed files
with
1,112 additions
and
899 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,14 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install/Update build dependencies | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools | ||
python -m pip install --upgrade pip | ||
- name: Install Poetry | ||
run: | | ||
curl -sL https://install.python-poetry.org | python - | ||
- name: Update Pip | ||
run: poetry run pip install -U pip setuptools | ||
- name: Install Nox Dependencies | ||
run: | | ||
python -m pip install poetry nox nox-poetry pyparsing==3.0.4 | ||
python -m pip install -e .[test,benchmark,docs] | ||
- name: Run Benchmark for time | ||
run: nox --non-interactive --session benchmark_time -- --full-trace | ||
run: pytest --benchmark-json output.json -k _time tests/benchmarks | ||
|
||
- name: Download previous benchmark data | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -53,13 +47,16 @@ jobs: | |
gh-pages-branch: "benchmarks" | ||
benchmark-data-dir-path: "docs/bench" | ||
alert-comment-cc-users: '@danwos' | ||
- name: Run memory benchmark | ||
run: nox --non-interactive --session benchmark_memory | ||
|
||
- name: Run Benchmark for memory | ||
run: pytest --benchmark-json output.json -k _time tests/benchmarks | ||
- name: Create memory flamegraph | ||
run: memray flamegraph -o mem_out.html mem_out.bin | ||
- name: Publish memory flamegraph | ||
run: | | ||
git checkout benchmarks | ||
cp mem_out.html docs/memory.html | ||
git add docs/memory.html | ||
git -c "user.name=Sphinx-Needs CI" -c "[email protected]" commit -m "memory.html update" | ||
- name: Push changes | ||
run: git push origin benchmarks | ||
run: git push origin benchmarks |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,62 @@ | ||
name: CI | ||
on: [pull_request] | ||
jobs: | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- uses: pre-commit/[email protected] | ||
|
||
tests: | ||
name: "py${{ matrix.python-version }} sp${{ matrix.sphinx-version }} do${{ matrix.docutils-version }} ${{ matrix.os }}" | ||
name: "py${{ matrix.python-version }} sphinx~=${{ matrix.sphinx-version }} ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # Set on "false" to get the results of ALL builds | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
# 3.9.8 seems to be broken with type_ast | ||
# https://www.mail-archive.com/[email protected]/msg1829077.html | ||
python-version: ["3.8", "3.10"] | ||
sphinx-version: ['5.2.1', '4.5.0'] | ||
docutils-version: ['0.19', '0.15'] | ||
exclude: | ||
- sphinx-version: "4.5.0" | ||
docutils-version: "0.19" | ||
python-version: ["3.8", "3.11"] | ||
sphinx-version: ["5.0", "6.0", "7.0"] | ||
include: | ||
# Check only newest setups for win server | ||
- os: "windows-latest" | ||
python-version: "3.8" | ||
sphinx-version: "4.5.0" | ||
docutils-version: "0.15" | ||
sphinx-version: "5.0" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set Up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Nox Dependencies | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install poetry nox nox-poetry pyparsing==3.0.4 | ||
- name: Install other dependencies | ||
python -m pip install sphinx~=${{ matrix.sphinx-version }} -e .[test] | ||
python -m pip freeze | ||
- name: Run pytest | ||
run: | | ||
python -m pip install setuptools | ||
- name: Final package list | ||
run: | | ||
pip freeze | ||
- name: Run Tests on Windows | ||
run: nox --non-interactive --session "tests-${{ matrix.python-version }}(sphinx='${{ matrix.sphinx-version }}', docutils='${{ matrix.docutils-version }}')" -- --full-trace | ||
if: runner.os == 'Windows' | ||
|
||
- name: Run Tests on Linux | ||
run: nox --non-interactive --session "tests-${{ matrix.python-version }}(sphinx='${{ matrix.sphinx-version }}', docutils='${{ matrix.docutils-version }}')" -- --full-trace | ||
if: runner.os == 'Linux' | ||
python -m pytest -v --ignore=tests/benchmarks -m "not jstest" tests | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- uses: pre-commit/[email protected] | ||
|
||
check: | ||
check: | ||
|
||
# This job does nothing and is only used for the branch protection | ||
# see https://github.com/marketplace/actions/alls-green#why | ||
|
||
if: always() | ||
|
||
needs: | ||
- lint | ||
- tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
|
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
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.