Add required Infrastructure for Gitlab merges
[gromacs.git] / admin / ci-templates / .test-script-template.yml
blobfd056aadaa02314fd7a2cd1ef6c578050c951865
1 .test-script-template:
2    only:
3     refs:
4       - web
5       - pushes
6       - schedules
7       - merge_requests
9    script:
10      - cd $BUILD_DIR
11      - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
12      - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
13           ctestLog.log | tee ctestErrors.log
14      - xsltproc scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
15      - if [ -s ctestErrors.log ] ; then
16          echo "Error during running ctest";
17          exit 1;
18        fi
19      - cd ..
20      - tar xzf gmx-regressiontests.tar.gz
21      - source $INSTALL_DIR/bin/GMXRC
22      - cd regressiontests
23      - echo "perl gmxtest.pl -nt $REGRESSIONTEST_TOTAL_RANK_NUMBER -ntomp $REGRESSIONTEST_OMP_RANK_NUMBER -npme $REGRESSIONTEST_PME_RANK_NUMBER $REGRESSIONTEST_DOUBLE $REGRESSIONTEST_MPI_RUN_COMMAND"
24      - perl gmxtest.pl -nt $REGRESSIONTEST_TOTAL_RANK_NUMBER -ntomp $REGRESSIONTEST_OMP_RANK_NUMBER
25        -npme $REGRESSIONTEST_PME_RANK_NUMBER $REGRESSIONTEST_DOUBLE $REGRESSIONTEST_MPI_RUN_COMMAND -xml all
26    artifacts:
27      reports:
28        junit: $BUILD_DIR/JUnitTestResults.xml
29      paths:
30          - $BUILD_DIR/Testing
31          - $BUILD_DIR/tests
32          - regressiontests
33      when: always
34      expire_in: 1 week