From 95779664343425acf30b65083f42abd57e50429d Mon Sep 17 00:00:00 2001 From: sarps Date: Sat, 3 Aug 2024 15:17:30 +0200 Subject: [PATCH] Add test workflow for Student Submission, which can be used for pre-compile tests etc. --- .github/workflows/maven.yml | 44 +++++++++++++++++++++------------- src/main/resources/logback.xml | 1 + 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c3c37667..fc8bb55b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,20 +15,30 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: '21' - distribution: 'adopt' - - - name: Install Maven - run: | - sudo rm -rf /usr/bin/mvn - sudo wget -q -O - "https://apache.osuosl.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz" | sudo tar xzf - -C /usr/share - sudo ln -s /usr/share/apache-maven-3.9.8/bin/mvn /usr/bin/mvn - - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'adopt' + + - name: Install Maven + run: | + sudo rm -rf /usr/bin/mvn + sudo wget -q -O - "https://apache.osuosl.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz" | sudo tar xzf - -C /usr/share + sudo ln -s /usr/share/apache-maven-3.9.8/bin/mvn /usr/bin/mvn + + - name: Build and Test with Maven + run: mvn -B package --file pom.xml + + - name: Run Tests on Student Submission + run: | + git config --global url.https://github.com/.insteadOf git://github.com/ + git clone https://github.com/sarpsahinalp/test-student-submission.git + mkdir test-student-submission/libs + cp target/*.jar test-student-submission/libs + cd test-student-submission + ./gradlew build + ./gradlew test diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 0f2c37ac..8250fafe 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -12,6 +12,7 @@ +