From 8b27f0dd5886728fe744c706ceefe39e55eab525 Mon Sep 17 00:00:00 2001 From: Nikolai Amelichev Date: Wed, 20 Dec 2023 23:12:29 +0100 Subject: [PATCH] Build and Test YOJ using GitHub Actions on any PR and merge to `main` --- .github/workflows/build.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..e8a1f4f4 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Build YOJ (unit tests only) + +on: + push: + branches: [main] + pull_request: + branches: [main] + types: [opened, synchronize, reopened, edited, ready_for_review] + +jobs: + build: + name: Build YOJ (unit tests only) + runs-on: ubuntu-latest + + env: + MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'temurin' + cache: 'maven' + + - name: Build with Maven + run: mvn $MAVEN_ARGS verify + + - name: Publish Test Report + if: ${{ always() }} + uses: scacap/action-surefire-report@v1 \ No newline at end of file