-
Notifications
You must be signed in to change notification settings - Fork 135
Use ubuntu image to run as local #1615
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
4bc777a
Adding containerized step
germa89 f605e4d
adding logging to container
germa89 3ab539e
right repo
germa89 aa5a1ae
Removing sudo, loging and launching MAPDL.
germa89 ab08221
adding -y and removing extra steps
germa89 db03e7d
adding python call
germa89 44a5bea
adding -m
germa89 b3efea3
check docker
germa89 fea602b
-m
germa89 b68945f
fixing xvfc
germa89 335140d
unset env var
germa89 ef784ad
test
germa89 1ccfede
adding unset
germa89 f0c5ad4
fixing env var
germa89 1bd7691
avoiding database
germa89 880119e
disabling dpf
germa89 8429ecf
running launcher tests
germa89 eecb3cd
making sure we run the tests
germa89 21e0daa
replacing versions
germa89 f82d797
skipping failure to fix later.
germa89 898b8b3
skipping failing part
germa89 a802812
changing name and some cosmetic
germa89 6ea9b60
testing fix to coverage
germa89 14cf8b6
adding launcher to tests
germa89 c92d277
testing simpler filtering
germa89 a987fd4
Resetting cache
germa89 570235b
Merge branch 'main' into feat/add-ubuntu-image
germa89 26b9bc7
Version check
germa89 0812289
chaging python version
germa89 e54a74c
Merge branch 'main' into feat/add-ubuntu-image
germa89 386139e
fixing pip install
germa89 6d0e265
resetting cache
germa89 a30c100
back to updated python version
germa89 cd8b187
Merge branch 'main' into feat/add-ubuntu-image
germa89 671bd2a
Adding _exited to multiple connect.
germa89 951c9aa
updating pre-commit
germa89 c4a4023
attemp 1
germa89 dc3942c
Adding logic to relaunch MAPDL instance if something fails.
germa89 b36e3e5
fixing missing pip ??
germa89 235a11f
using bash as default
germa89 0c97627
removing file
germa89 1755f7e
fixing issues ?
germa89 2128449
fixing permissions.
germa89 072456c
removing redundant line.
germa89 d3972f2
Adding error type so it can be re-runned by CI.
germa89 20d761d
skipping flaky test on ubuntu local.
germa89 8e6c694
Merge branch 'main' into feat/add-ubuntu-image
germa89 b641bfa
Skiping failing test.
germa89 b9cfbfd
disabling more failing test on ubuntu.
germa89 6e92144
fixing style
germa89 32db21f
Merge branch 'main' into feat/add-ubuntu-image
germa89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -19,6 +19,7 @@ env: | |
DPF_PORT: 21002 | ||
DOCKER_PACKAGE: ghcr.io/pyansys/pymapdl/mapdl | ||
DOCKER_IMAGE_VERSION_DOCS_BUILD: v22.2.0 | ||
ON_CI: True | ||
# Following env vars when changed will "reset" the mentioned cache, | ||
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-... | ||
# You should go up in number, if you go down (or repeat a previous value) | ||
|
@@ -428,9 +429,71 @@ jobs: | |
if compgen -G './logs-${{ matrix.mapdl-version }}/*.log' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.log; do echo "::group:: Log file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
if compgen -G './logs-${{ matrix.mapdl-version }}/*.out' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.out; do echo "::group:: Output file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
|
||
build_test_ubuntu: | ||
name: Local Unit Testing on Ubuntu | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/pyansys/mapdl:v22.2-ubuntu | ||
options: "--entrypoint /bin/bash" | ||
credentials: | ||
username: ${{ secrets.GH_USERNAME }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Checking python | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
||
- name: Install OS packages | ||
run: | | ||
apt update | ||
apt install -y libgl1-mesa-glx xvfb | ||
|
||
- name: Test virtual framebuffer | ||
run: | | ||
python -m pip install -r .ci/requirements_test_xvfb.txt | ||
xvfb-run python .ci/display_test.py | ||
|
||
- name: Install ansys-mapdl-core | ||
run: | | ||
python -m pip install build | ||
python -m build | ||
python -m pip install dist/*.whl | ||
xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())" | ||
|
||
|
||
- name: Unit Testing Requirements Installation | ||
run: | | ||
python -m pip install -r requirements/requirements_tests.txt | ||
|
||
# - name: DPF Server Activation | ||
# run: | | ||
# docker pull ghcr.io/pyansys/dpf-core:22.2dev | ||
# docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/pyansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}." | ||
|
||
- name: Unit Testing | ||
run: | | ||
unset PYMAPDL_PORT | ||
unset PYMAPDL_START_INSTANCE | ||
export ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }} | ||
export AWP_ROOT222=/ansys_inc | ||
xvfb-run pytest -v -k "not test_database and not test_dpf" --durations=10 --maxfail=10 --reruns 7 --reruns-delay 3 --only-rerun MapdlExitedError --cov=ansys.mapdl.core --cov-report=xml --cov-report=html | ||
|
||
- uses: codecov/codecov-action@v3 | ||
name: 'Upload coverage to Codecov' | ||
with: | ||
root_dir: ${{ github.workspace }} | ||
|
||
Release: | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
needs: [docs_build, build_test] | ||
needs: [docs_build, build_test, build_test_ubuntu] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.