From 8d1ac20da7d99bb0a82415c26a289376213fd229 Mon Sep 17 00:00:00 2001 From: DasLixou Date: Wed, 27 Apr 2022 13:52:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=99=20Make=20Tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-release.yml | 6 ++++- .github/workflows/tests.yml | 33 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index efef441..2d71e0b 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -21,7 +21,11 @@ jobs: distribution: 'zulu' - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Build with Gradle + - name: Build Stracciatella Classes and TestClasses + run: './gradlew clean classes testClasses' + - name: Run Tests + run: './gradlew test' + - name: Build Artifact with Gradle run: './gradlew clean shadowJar' - name: Make Release uses: "marvinpinto/action-automatic-releases@latest" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1a260b6 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Test Stracciatella + +on: + push: + branches-ignore: + - "main" # Uses its own tests in build-and-release.yml + paths: + - "src/**" + - "build.gradle" + pull_request: + branches: [ main ] + paths: + - "src/**" + - "build.gradle" + +jobs: + test: + name: "Build and Test" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup JDK + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'zulu' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build Stracciatella + run: './gradlew clean classes testClasses' + - name: Run Tests + run: './gradlew test' \ No newline at end of file