Skip to content

Commit 19233c5

Browse files
committed
[ci] Use new sofa-test-action
1 parent 0161553 commit 19233c5

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ jobs:
2121
sofa_root: ${{ github.workspace }}/sofa
2222
sofa_version: ${{ matrix.sofa_branch }}
2323
sofa_scope: 'standard'
24+
2425
- name: Checkout source code
25-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2627
with:
2728
path: ${{ env.WORKSPACE_SRC_PATH }}
2829

@@ -100,34 +101,17 @@ jobs:
100101
echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV
101102
fi
102103
103-
- name: Run Tearing_test
104-
if: always()
105-
shell: bash
106-
run: |
107-
chmod +x $WORKSPACE_BUILD_PATH/bin/Tearing_test${{ steps.sofa.outputs.exe }}
108-
cd $WORKSPACE_BUILD_PATH
109-
./bin/Tearing_test${{ steps.sofa.outputs.exe }}
110-
111-
- name: Fetch, install and run Regression_test
112-
if: always()
113-
shell: bash
114-
run: |
115-
if [[ "$RUNNER_OS" != "macOS" ]]; then
116-
# Get regression from github releases
117-
mkdir -p "${{ runner.temp }}/regression_tmp/install"
118-
curl --output "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -L https://github.com/sofa-framework/regression/releases/download/release-master/Regression_test_master_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${RUNNER_OS}.zip
119-
unzip -qq "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -d "${{ runner.temp }}/regression_tmp/install"
120-
# Install it in the SOFA bin directory
121-
$SUDO mv "${{ runner.temp }}"/regression_tmp/install/Regression_*/bin/* "${SOFA_ROOT}/bin"
122-
chmod +x ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}
123-
# Setup mandatory env vars
124-
export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/scenes"
125-
export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references"
126-
# Run regression test bench
127-
${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}
128-
else
129-
echo "Regression tests are not supported on the CI for macOS yet (TODO)"
130-
fi
104+
- name: Launch test
105+
id: tests
106+
uses: sofa-framework/sofa-test-action@v1.0
107+
with:
108+
sofa_root: ${{ github.workspace }}/sofa
109+
sofa_version: ${{ steps.sofa.outputs.sofa_version }}
110+
src_dir: ${{ env.WORKSPACE_SRC_PATH }}
111+
build_dir: ${{ env.WORKSPACE_BUILD_PATH }}
112+
python_exe: ${{ steps.sofa.outputs.python_exe }}
113+
output_dir: ${{ github.workspace }}/tests-results_dir
114+
nb_parallel_threads: '4'
131115

132116
deploy:
133117
name: Deploy artifacts

0 commit comments

Comments
 (0)