From 21c366a47648fd6a4e8b01cc0a46f355d8658fc7 Mon Sep 17 00:00:00 2001 From: Matt King Date: Sun, 28 Jul 2024 14:21:29 +0100 Subject: [PATCH] Add build-test.yaml and README.md to add badge --- .github/workflows/build-test.yaml | 42 +++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/build-test.yaml create mode 100644 README.md diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml new file mode 100644 index 0000000..9234ad9 --- /dev/null +++ b/.github/workflows/build-test.yaml @@ -0,0 +1,42 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + architecture: x64 + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build + - name: Run unit tests + run: ./gradlew test + diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef88ebe --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# K2ZPL + +https://github.com/itsmattking/k2zpl/actions/workflows/build-test.yaml/badge.svg