Skip to content

Commit 23b76e8

Browse files
authored
Merge pull request #31 from bakpaul/26_03_add_sofa_test_action
[CI] Add sofa-test-action
2 parents 967d9a0 + 2040e6c commit 23b76e8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,32 @@ jobs:
8585
name: ${{ steps.sanitize.outputs.artifact_name }}
8686
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
8787

88+
- name: Pepare python environement for tests
89+
shell: bash
90+
run: |
91+
${{ steps.sofa.outputs.python_exe }} -m pip install matplotlib
92+
93+
- name: Launch test
94+
id: tests
95+
uses: sofa-framework/sofa-test-action@v1.0
96+
with:
97+
sofa_root: ${{ github.workspace }}/sofa
98+
sofa_version: ${{ steps.sofa.outputs.sofa_version }}
99+
src_dir: ${{ env.WORKSPACE_SRC_PATH }}
100+
build_dir: ${{ env.WORKSPACE_BUILD_PATH }}
101+
python_exe: ${{ steps.sofa.outputs.python_exe }}
102+
output_dir: ${{ github.workspace }}/tests-results_dir
103+
nb_parallel_threads: '4'
104+
88105
- name: Notify dashboard
89106
if: always() && startsWith(github.repository, 'sofa-framework') && startsWith(github.ref, 'refs/heads/master') # we are not on a fork and on master
90107
env:
91108
DASH_AUTH: ${{ secrets.PLUGIN_DASH }}
92109
shell: bash
93110
run: |
111+
test_status=$([ '${{ steps.tests.outcome }}' == 'success' ] && \
112+
echo 'true' || echo 'false')
113+
94114
build_status=$([ '${{ steps.build-and-install.outcome }}' == 'success' ] && \
95115
echo 'true' || echo 'false')
96116
@@ -107,6 +127,7 @@ jobs:
107127
\"url\":\"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\",\
108128
\"os\":\"$os\",\
109129
\"build\":$build_status,\
130+
\"tests\":$test_status,\
110131
\"binary\":$binary_status}"\
111132
https://sofa-framework.org:5000/api/v1/plugins
112133

0 commit comments

Comments
 (0)