Skip to content

Commit 98708c9

Browse files
koubaaMohamed Koubaapyansys-ci-bot
authored
Test specific version (#771)
Co-authored-by: Mohamed Koubaa <[email protected]> Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 8a104d9 commit 98708c9

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

.github/workflows/ci_cd.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ name: GitHub CI
33
on:
44
pull_request:
55
workflow_dispatch:
6+
inputs:
7+
revn:
8+
type: choice
9+
options:
10+
- '251'
11+
- '242'
12+
- '241'
13+
description: 'The Mechanical revision number to run tests on.'
14+
default: '241' #stable version is 241, must match $stable_container
615
schedule:
716
- cron: '00 22 * * *' # UTC time, may start 5-15 mins later than scheduled time
817
# registry_package:
@@ -15,6 +24,8 @@ on:
1524
- main
1625
- release/*
1726

27+
28+
1829
env:
1930
PYMECHANICAL_PORT: 10000 # default won't work on GitHub runners
2031
PYMECHANICAL_START_INSTANCE: false
@@ -23,9 +34,6 @@ env:
2334
PACKAGE_NAME: ansys-mechanical-core
2435
DOCUMENTATION_CNAME: mechanical.docs.pyansys.com
2536
MAIN_PYTHON_VERSION: '3.10'
26-
# LATEST_STABLE_REVN and its Docker image are used in pull requests
27-
LATEST_STABLE_REVN: '241'
28-
LATEST_STABLE_DOCKER_IMAGE_VERSION: '24.1.0'
2937
# DEV_REVN & its Docker image are used in scheduled or registry package runs
3038
DEV_REVN: '242'
3139
DEV_DOCKER_IMAGE_VERSION: '24.2_candidate'
@@ -109,21 +117,26 @@ jobs:
109117
run: |
110118
if ${{ github.event_name == 'schedule' }}; then
111119
# 242
112-
echo "test_revn=${{ env.DEV_REVN }}" >> $GITHUB_OUTPUT
120+
echo "test_revn=${{ inputs.mech_revn }}" >> $GITHUB_OUTPUT
113121
# ghcr.io/ansys/mechanical:24.2_candidate
114122
echo "test_container=${{ env.DOCKER_PACKAGE }}:${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
115123
# 24.2_candidate
116124
echo "test_docker_image_version=${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
117125
else
118-
# 241
126+
if [[ -z "${{inputs.revn}}" ]]; then
127+
export mech_revn=241
128+
else
129+
export mech_revn=${{inputs.revn}}
130+
fi
131+
export mech_image_version=${mech_revn:0:2}.${mech_revn:2}.0
119132
echo "test_revn=${{ env.LATEST_STABLE_REVN }}" >> $GITHUB_OUTPUT
120133
# ghcr.io/ansys/mechanical:24.1.0
121-
echo "test_container=${{ env.DOCKER_PACKAGE }}:${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
134+
echo "test_container=${{ env.DOCKER_PACKAGE }}:$mech_image_version" >> $GITHUB_OUTPUT
122135
# 24.1.0
123-
echo "test_docker_image_version=${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
136+
echo "test_docker_image_version=$mech_image_version" >> $GITHUB_OUTPUT
124137
fi
125138
126-
echo "stable_container=${{ env.DOCKER_PACKAGE }}:${{ env.LATEST_STABLE_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
139+
echo "stable_container=${{ env.DOCKER_PACKAGE }}:24.1.0" >> $GITHUB_OUTPUT
127140
128141
config-matrix:
129142
runs-on: ubuntu-latest

doc/changelog.d/771.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test specific version

0 commit comments

Comments
 (0)