From b6f56efb0213264bdc5c12c6eee7d152335c8627 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 20 Oct 2024 20:07:40 +0300 Subject: [PATCH] Add .github/workflows for a build --- .github/workflows/build.yml | 30 +++++++++++++++++++ .../AuthorizedFunPayExecutorTest.java | 2 ++ .../{ => ru/funpay4j}/FunPayExecutorTest.java | 2 ++ ...FunPayUserUtilLastSeenAtConverterTest.java | 3 +- ...nPayUserUtilRegisterDateConverterTest.java | 3 +- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml rename core/src/test/java/{ => ru/funpay4j}/AuthorizedFunPayExecutorTest.java (99%) rename core/src/test/java/{ => ru/funpay4j}/FunPayExecutorTest.java (99%) rename core/src/test/java/{ => ru/funpay4j}/util/FunPayUserUtilLastSeenAtConverterTest.java (98%) rename core/src/test/java/{ => ru/funpay4j}/util/FunPayUserUtilRegisterDateConverterTest.java (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..43a8a82 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + java-version: [8, 11, 17, 21] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java-version }} + + - name: Make gradlew executable + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew build --no-daemon --stacktrace diff --git a/core/src/test/java/AuthorizedFunPayExecutorTest.java b/core/src/test/java/ru/funpay4j/AuthorizedFunPayExecutorTest.java similarity index 99% rename from core/src/test/java/AuthorizedFunPayExecutorTest.java rename to core/src/test/java/ru/funpay4j/AuthorizedFunPayExecutorTest.java index 2cdade6..ba2f0e0 100644 --- a/core/src/test/java/AuthorizedFunPayExecutorTest.java +++ b/core/src/test/java/ru/funpay4j/AuthorizedFunPayExecutorTest.java @@ -12,6 +12,8 @@ * limitations under the License. */ +package ru.funpay4j; + import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.junit.jupiter.api.AfterEach; diff --git a/core/src/test/java/FunPayExecutorTest.java b/core/src/test/java/ru/funpay4j/FunPayExecutorTest.java similarity index 99% rename from core/src/test/java/FunPayExecutorTest.java rename to core/src/test/java/ru/funpay4j/FunPayExecutorTest.java index c86ec41..0b1b81b 100644 --- a/core/src/test/java/FunPayExecutorTest.java +++ b/core/src/test/java/ru/funpay4j/FunPayExecutorTest.java @@ -12,6 +12,8 @@ * limitations under the License. */ +package ru.funpay4j; + import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.junit.jupiter.api.AfterEach; diff --git a/core/src/test/java/util/FunPayUserUtilLastSeenAtConverterTest.java b/core/src/test/java/ru/funpay4j/util/FunPayUserUtilLastSeenAtConverterTest.java similarity index 98% rename from core/src/test/java/util/FunPayUserUtilLastSeenAtConverterTest.java rename to core/src/test/java/ru/funpay4j/util/FunPayUserUtilLastSeenAtConverterTest.java index 1208c20..d782702 100644 --- a/core/src/test/java/util/FunPayUserUtilLastSeenAtConverterTest.java +++ b/core/src/test/java/ru/funpay4j/util/FunPayUserUtilLastSeenAtConverterTest.java @@ -26,10 +26,9 @@ * limitations under the License. */ -package util; +package ru.funpay4j.util; import org.junit.jupiter.api.Test; -import ru.funpay4j.util.FunPayUserUtil; import java.text.SimpleDateFormat; import java.util.Calendar; diff --git a/core/src/test/java/util/FunPayUserUtilRegisterDateConverterTest.java b/core/src/test/java/ru/funpay4j/util/FunPayUserUtilRegisterDateConverterTest.java similarity index 98% rename from core/src/test/java/util/FunPayUserUtilRegisterDateConverterTest.java rename to core/src/test/java/ru/funpay4j/util/FunPayUserUtilRegisterDateConverterTest.java index ca465cd..27b5f12 100644 --- a/core/src/test/java/util/FunPayUserUtilRegisterDateConverterTest.java +++ b/core/src/test/java/ru/funpay4j/util/FunPayUserUtilRegisterDateConverterTest.java @@ -26,10 +26,9 @@ * limitations under the License. */ -package util; +package ru.funpay4j.util; import org.junit.jupiter.api.Test; -import ru.funpay4j.util.FunPayUserUtil; import java.text.SimpleDateFormat; import java.util.Calendar;