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