comp1110-ass2/.gitlab-ci.yml

184 lines
4.1 KiB
YAML
Raw Normal View History

2023-03-13 20:34:59 +11:00
image: paulwarfie/comp1110-2023-s1-gitlab-ci:0.1.0
stages:
- checksum
- compliance
- build
- test
before_script:
- export PATH_TO_FX=/usr/share/openjfx/lib
- export JAVAFX_OPTIONS="--module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.media"
- export CP=src:src-dev:/ass2/*:/shared/junit-platform-console-standalone-1.7.0.jar:$PATH_TO_FX/*
2023-04-18 16:26:31 +10:00
- export JUNIT="java $JAVAFX_OPTIONS -jar /shared/junit-platform-console-standalone-1.7.0.jar --class-path src:src-dev:/ass2/comp1110-ass2.jar --disable-banner --reports-dir=junit-reports"
- export SRC_FILES=$(find src/ -type f -name '*.java')
- export SRC_DEV_FILES=$(if [ -d "src-dev/" ]; then find src-dev/ -type f -name '*.java'; fi)
2023-03-13 20:34:59 +11:00
checksum:
tags:
- comp1110
stage: checksum
script:
- python3 /validate.py --integrity comp1110-ass2
except:
variables:
- $CI_PROJECT_NAME =~ /.*-dev$/
compliance:
tags:
- comp1110
stage: compliance
script:
- python3 /validate.py --gitlablogin ${GITLAB_USER_LOGIN} --gitlabuser "${GITLAB_USER_NAME}" --gitlabprojectname "${CI_PROJECT_NAME}" --assignment /ass2/compliance-ass2.yml
except:
variables:
- $CI_PROJECT_NAME =~ /.*-dev$/
allow_failure: true
build:
tags:
- comp1110
stage: build
script:
- javac -encoding utf-8 $JAVAFX_OPTIONS -cp $CP $SRC_FILES $SRC_DEV_FILES
2023-03-13 20:34:59 +11:00
artifacts:
paths:
- src/
- src-dev/
2023-03-13 20:34:59 +11:00
2023-03-22 14:26:58 +11:00
task3:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.IsStateStringWellFormedTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task4:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.IsMoveStringWellFormedTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task6:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.DistributeResourcesTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task7:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.IsMoveValidTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task8:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.GenerateAllValidMovesTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task9:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.IsPhaseOverTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task10:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.PlacePieceTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task11:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.CalculateIslandLinksScoreTest -c=comp1110.ass2.CalculateIslandMajoritiesScoreTest -c=comp1110.ass2.CalculateResourcesAndStatuettesScoreTest -c=comp1110.ass2.CalculateTotalIslandsScoreTest -c=comp1110.ass2.CalculateScoresTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task12:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.EndPhaseTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task13:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.ApplyMoveTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task16:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.GenerateAIMoveTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
task17:
tags:
- comp1110
stage: test
script:
- $JUNIT -c=comp1110.ass2.VariableBoardSizeTest -c=comp1110.ass2.ThreeFourPlayerTest -c=comp1110.ass2.VariableSizeThreeFourPlayerTest
allow_failure: true
2023-04-18 16:26:31 +10:00
artifacts:
reports:
junit: junit-reports/TEST-junit-jupiter.xml
2023-03-22 14:26:58 +11:00
2023-03-13 20:34:59 +11:00
## Local Variables:
## mode: yaml
## End: