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: use tox in ci #2031

Merged
merged 65 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
11aa671
feat: documentation building
moe-ad Jan 22, 2025
2d7b82b
ci: test import fix
moe-ad Jan 22, 2025
a47dc7c
ci: add more environment variables
moe-ad Jan 22, 2025
bc92ba7
ci: test fix
moe-ad Jan 22, 2025
bb17635
ci: test fix
moe-ad Jan 22, 2025
ac8dc8f
ci: test fix
moe-ad Jan 22, 2025
7e3e419
ci: test fix
moe-ad Jan 23, 2025
8cb38dd
ci: doc.yml updated
moe-ad Jan 24, 2025
5fe5e79
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Jan 24, 2025
bde31f8
ci: fix docs.yml
moe-ad Jan 24, 2025
6c010c6
ci: tests.yml update
moe-ad Jan 24, 2025
d595c75
ci: test another fix
moe-ad Jan 24, 2025
b572104
ci: test another fix
moe-ad Jan 24, 2025
71a8b84
ci: little optimization and separating tests
moe-ad Jan 24, 2025
58f66f2
ci: another fix, very moody tests
moe-ad Jan 24, 2025
f55effd
ci: ANSYS_DPF_PATH approach
moe-ad Jan 27, 2025
aa9edc0
ci: another fix
moe-ad Jan 27, 2025
f7a2d77
fix: attempting another fix
moe-ad Jan 27, 2025
4495e92
ci: another fix
moe-ad Jan 29, 2025
a1a68f5
ci: another fix
moe-ad Jan 29, 2025
56fc675
ci: another fix
moe-ad Jan 29, 2025
41ad21e
ci: another fix
moe-ad Jan 29, 2025
1052d4d
ci: another fix
moe-ad Jan 29, 2025
b4847b0
ci: another fix
moe-ad Jan 30, 2025
6562b84
ci: another fix
moe-ad Jan 30, 2025
0ea6e4a
ci: another fix
moe-ad Jan 30, 2025
7f46d0d
ci: avoid unnecessary windows runner tox env installation
moe-ad Jan 30, 2025
26398fd
ci: increase timeout minutes
moe-ad Jan 30, 2025
8e3e701
ci: increase timeout minutes
moe-ad Jan 30, 2025
6081dc2
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Jan 30, 2025
dc78e90
ci: activate uv and pytest-xdist
moe-ad Jan 31, 2025
f3b6e05
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Jan 31, 2025
fb4ea95
ci: activate uv and pytest-xdist
moe-ad Jan 31, 2025
1bef49e
ci: cache .tox directory
moe-ad Jan 31, 2025
c7eec15
ci: modify CLI flags
moe-ad Jan 31, 2025
6905169
ci: remove pytest-xdist
moe-ad Jan 31, 2025
80b9ffb
ci: trigger workflow for caches usage investigation
moe-ad Jan 31, 2025
40bb5a5
ci: check influence of multiple tox invocation
moe-ad Jan 31, 2025
78a278b
ci: another possible optimization
moe-ad Jan 31, 2025
dfdf03b
ci: another fix
moe-ad Feb 2, 2025
913c117
ci: another test
moe-ad Feb 2, 2025
d3057fc
ci: another test
moe-ad Feb 2, 2025
b9a552a
ci: stable implementation
moe-ad Feb 2, 2025
bb6f34d
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Feb 2, 2025
78bea21
ci: larger runners testing time improvements
moe-ad Feb 3, 2025
61138af
ci: empty commit to see caching effect
moe-ad Feb 3, 2025
eb1e273
ci: run without coverage and junit
moe-ad Feb 3, 2025
20d4dd8
ci: run without coverage only
moe-ad Feb 3, 2025
6f79b66
ci: run with pytest-cov version bumped
moe-ad Feb 3, 2025
1380b72
ci: run with pytest-cov version bumped
moe-ad Feb 3, 2025
60418f3
ci: test a fix
moe-ad Feb 3, 2025
182d656
ci: bump coverage version
moe-ad Feb 3, 2025
4b63822
ci: remove coverage dep
moe-ad Feb 4, 2025
51116a0
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Feb 4, 2025
815c9eb
ci: check if coverage is using compiled C extensions
moe-ad Feb 4, 2025
6d6fa88
ci: check effect of html/xml reporting
moe-ad Feb 4, 2025
cb79b6c
ci: use system-wide coverage/pytest-cov
moe-ad Feb 4, 2025
b0ae476
ci: check influence of system wide installs
moe-ad Feb 4, 2025
ec67550
ci: effect of separate coverage file
moe-ad Feb 4, 2025
f79390a
ci: test fix
moe-ad Feb 4, 2025
9a714ac
ci: update codecov action
moe-ad Feb 4, 2025
d7585bb
ci: review suggestions + additional optimizations
moe-ad Feb 5, 2025
2b57bd7
Merge branch 'master' into feat/use-tox-in-ci
moe-ad Feb 5, 2025
6ec7bc4
ci: correction
moe-ad Feb 5, 2025
2364517
ci: suppress printing report info to stdout
moe-ad Feb 5, 2025
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
78 changes: 6 additions & 72 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,34 +73,16 @@ jobs:
with:
python-version: ${{ inputs.python_version }}

- name: "Create virtual environment in the current workspace"
shell: pwsh
run: python -m venv .venv --system-site-packages

- name: "Update PATH for virtual environment"
run: |
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH

- name: "Update pip to the latest version"
- name: "Update pip to the latest version and install tox"
shell: pwsh
run: |
python -m pip install -U pip

- name: "Install requirements"
shell: pwsh
run: |
python -m pip install -r requirements/requirements_build.txt
python -m pip install tox tox-uv

- name: "Build the wheel"
shell: pwsh
run: |
$os = "${{ matrix.os }}"
if ($os -eq "ubuntu-latest") {
$platform = "manylinux_2_17"
} else {
$platform = "win"
}
python .ci/build_wheel.py -p $platform -w
tox -e build-wheel

- name: "Expose the wheel"
shell: bash
Expand All @@ -111,11 +93,6 @@ jobs:
echo ${name}
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT

- name: "Install package wheel"
shell: pwsh
run: |
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]

- name: "Install DPF"
id: set-server-path
uses: ansys/pydpf-actions/[email protected]
Expand All @@ -128,9 +105,9 @@ jobs:
uses: ansys/pydpf-actions/[email protected]

- name: "Test import"
shell: pwsh
working-directory: tests
shell: bash
run: |
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}
python -c "from ansys.dpf import core"

- name: "Setup headless display"
Expand All @@ -143,53 +120,10 @@ jobs:
run: |
choco install pandoc

- name: "Install documentation packages for Python"
shell: pwsh
run: |
python -m pip install -r requirements/requirements_docs.txt

- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]

- name: "Ensure VTK compatibility"
shell: pwsh
run: |
python -m pip uninstall --yes vtk
python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }}

- name: "List installed packages"
shell: pwsh
run: |
python -m pip list

- name: "Build HTML Documentation"
shell: cmd /D /E:ON /V:OFF /C "CALL "{0}""
working-directory: .ci
run: |
build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1
timeout-minutes: 60
env:
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}

- name: "Check for success"
shell: bash
working-directory: doc
run: |
case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
0)
echo "Build succeeded!"
exit 0;;
1)
echo "Documentation generation failed, please check previous step!"
exit 1;;
*)
echo "An error occurred while checking success of the previous step!"
exit 1;;
esac

- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]
if: always()
tox -e doc-html --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:doc-html.setenv+='VIRTUALENV_SYSTEM_SITE_PACKAGES=true'

- name: "Retrieve package version"
shell: bash
Expand Down
Loading
Loading