Skip to content

Test specific version #771

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 15 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
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
29 changes: 21 additions & 8 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: GitHub CI
on:
pull_request:
workflow_dispatch:
inputs:
revn:
type: choice
options:
- '251'
- '242'
- '241'
description: 'The Mechanical revision number to run tests on.'
default: '241' #stable version is 241, must match $stable_container
schedule:
- cron: '00 22 * * *' # UTC time, may start 5-15 mins later than scheduled time
# registry_package:
Expand All @@ -15,6 +24,8 @@ on:
- main
- release/*



env:
PYMECHANICAL_PORT: 10000 # default won't work on GitHub runners
PYMECHANICAL_START_INSTANCE: false
Expand All @@ -23,9 +34,6 @@ env:
PACKAGE_NAME: ansys-mechanical-core
DOCUMENTATION_CNAME: mechanical.docs.pyansys.com
MAIN_PYTHON_VERSION: '3.10'
# LATEST_STABLE_REVN and its Docker image are used in pull requests
LATEST_STABLE_REVN: '241'
LATEST_STABLE_DOCKER_IMAGE_VERSION: '24.1.0'
# DEV_REVN & its Docker image are used in scheduled or registry package runs
DEV_REVN: '242'
DEV_DOCKER_IMAGE_VERSION: '24.2_candidate'
Expand Down Expand Up @@ -109,21 +117,26 @@ jobs:
run: |
if ${{ github.event_name == 'schedule' }}; then
# 242
echo "test_revn=${{ env.DEV_REVN }}" >> $GITHUB_OUTPUT
echo "test_revn=${{ inputs.mech_revn }}" >> $GITHUB_OUTPUT
# ghcr.io/ansys/mechanical:24.2_candidate
echo "test_container=${{ env.DOCKER_PACKAGE }}:${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
# 24.2_candidate
echo "test_docker_image_version=${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
else
# 241
if [[ -z "${{inputs.revn}}" ]]; then
export mech_revn=241
else
export mech_revn=${{inputs.revn}}
fi
export mech_image_version=${mech_revn:0:2}.${mech_revn:2}.0
echo "test_revn=${{ env.LATEST_STABLE_REVN }}" >> $GITHUB_OUTPUT
# ghcr.io/ansys/mechanical:24.1.0
echo "test_container=${{ env.DOCKER_PACKAGE }}:${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
echo "test_container=${{ env.DOCKER_PACKAGE }}:$mech_image_version" >> $GITHUB_OUTPUT
# 24.1.0
echo "test_docker_image_version=${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
echo "test_docker_image_version=$mech_image_version" >> $GITHUB_OUTPUT
fi

echo "stable_container=${{ env.DOCKER_PACKAGE }}:${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
echo "stable_container=${{ env.DOCKER_PACKAGE }}:24.1.0" >> $GITHUB_OUTPUT

config-matrix:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/771.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test specific version