-
Notifications
You must be signed in to change notification settings - Fork 135
ci: adapting workflow for new docker container #3805
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 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e9d119f
ci: add option to control Codecov report upload
germa89 cbf63b1
ci: add package registry input for container image in workflow
germa89 89beb7d
ci: add input for customizable runner in test workflow
germa89 a47bf5d
ci: make tags input optional in coverage report
germa89 6acc5e9
ci: add acceptable failure rate control for test session results
germa89 82f5e0e
ci: remove sudo from package installation in test workflow
germa89 dde965b
chore: adding changelog file 3805.maintenance.md [dependabot-skip]
pyansys-ci-bot 0db9d11
fix: replace warn with LOG.warning for better logging in MAPDL connec…
germa89 3e5c11a
fix: return empty string instead of None in _get_std_output for bette…
germa89 77f94b9
fix: correct formatting of error message in MapdlConnectionError for …
germa89 398a39f
fix: tests
germa89 9b1a6bc
fix: remove obsolete test file test_ger.py
germa89 e3336ff
Merge branch 'main' into ci/adapting-workflow-for-MAPDL-docker-builder
germa89 029d1a1
fix: update default version in build_matrix.sh to v25.2-ubuntu-amd
germa89 bfbc314
fix: add environment variables for Open MPI root permissions in local…
germa89 5a5f581
fix: using cicd flavour
germa89 d11b39c
fix: update mapdl-version to use v25.2-ubuntu-cicd in CI workflow
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
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 |
---|---|---|
|
@@ -48,9 +48,31 @@ on: | |
tags: | ||
description: | | ||
Tags to add to the coverage report. | ||
required: true | ||
required: false | ||
type: string | ||
|
||
codecov-report: | ||
description: | | ||
Whether to upload the coverage report to Codecov or not. If `true`, then the | ||
appropriate token is needed. | ||
required: false | ||
default: true | ||
type: boolean | ||
|
||
package-registry: | ||
description: | | ||
Package registry for the container. | ||
required: false | ||
type: string | ||
default: ghcr.io/ansys/mapdl | ||
|
||
runner: | ||
description: | | ||
Runner to use. | ||
required: false | ||
type: string | ||
default: ubuntu-22.04 | ||
|
||
secrets: | ||
license-server: | ||
description: | | ||
|
@@ -74,7 +96,7 @@ on: | |
|
||
jobs: | ||
test-local: | ||
runs-on: ubuntu-22.04 | ||
runs-on: ${{ inputs.runner }} | ||
env: | ||
ON_CI: True | ||
ON_LOCAL: true | ||
|
@@ -85,9 +107,11 @@ jobs: | |
P_SCHEMA: "/ansys_inc/v241/ansys/ac4/schema" | ||
PYTEST_TIMEOUT: 120 # seconds. Limit the duration for each unit test | ||
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile' | ||
OMPI_ALLOW_RUN_AS_ROOT: 1 | ||
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | ||
|
||
container: | ||
image: ghcr.io/ansys/mapdl:${{ inputs.mapdl-version }} | ||
image: "${{ inputs.package-registry }}:${{ inputs.mapdl-version }}" | ||
options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash | ||
credentials: | ||
username: ${{ secrets.username }} | ||
|
@@ -96,6 +120,8 @@ jobs: | |
steps: | ||
- name: "Install Git and checkout project" | ||
uses: actions/[email protected] | ||
with: | ||
repository: ansys/pymapdl | ||
|
||
- name: "Get if running student version" | ||
id: student_check | ||
|
@@ -115,13 +141,13 @@ jobs: | |
shell: bash | ||
if: inputs.testing-minimal == true | ||
run: | | ||
sudo apt-get update && apt install -y libgomp1 graphviz | ||
apt-get update && apt install -y libgomp1 graphviz | ||
|
||
- name: "Installing OS packages" | ||
shell: bash | ||
if: inputs.testing-minimal == false | ||
run: | | ||
sudo apt-get update && apt install -y libgl1-mesa-glx xvfb libgomp1 graphviz | ||
apt-get update && apt install -y libgl1-mesa-glx xvfb libgomp1 graphviz | ||
|
||
- name: "Setup Python" | ||
uses: actions/setup-python@v5 | ||
|
@@ -228,6 +254,7 @@ jobs: | |
|
||
- uses: codecov/codecov-action@v5 | ||
name: "Upload coverage to Codecov" | ||
if: inputs.codecov-report == true | ||
with: | ||
token: ${{ secrets.codecov-token }} # required | ||
root_dir: ${{ github.workspace }} | ||
|
@@ -236,6 +263,7 @@ jobs: | |
|
||
- name: "Upload coverage artifacts" | ||
uses: actions/upload-artifact@v4 | ||
if: inputs.codecov-report == true | ||
with: | ||
name: ${{ inputs.file-name }}.xml | ||
path: ./${{ inputs.file-name }}.xml | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ci: adapting workflow for new docker container |
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
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
Oops, something went wrong.
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.