From 895fcced9aaebead36951212f01382f19e06e656 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 22 Jul 2022 20:21:02 +0200 Subject: [PATCH] Add gradle CI action --- .github/workflows/gradle_push.yml | 32 +++++++++++++++++++ .../OpenPgpInputStreamTest.java | 3 +- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/gradle_push.yml diff --git a/.github/workflows/gradle_push.yml b/.github/workflows/gradle_push.yml new file mode 100644 index 00000000..189dc6ce --- /dev/null +++ b/.github/workflows/gradle_push.yml @@ -0,0 +1,32 @@ +# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: CI on main branch + +on: + push: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Build, Check and Coverage + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + with: + arguments: check jacocoRootReport coveralls \ No newline at end of file diff --git a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/OpenPgpInputStreamTest.java b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/OpenPgpInputStreamTest.java index a39ee70f..d731fb87 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/OpenPgpInputStreamTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/OpenPgpInputStreamTest.java @@ -23,7 +23,6 @@ import org.bouncycastle.openpgp.PGPCompressedDataGenerator; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.bouncycastle.util.io.Streams; -import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.Test; import org.pgpainless.PGPainless; import org.pgpainless.algorithm.CompressionAlgorithm; @@ -36,7 +35,7 @@ public class OpenPgpInputStreamTest { private static final Random RANDOM = new Random(); - @RepeatedTest(100) + @Test public void randomBytesDoNotContainOpenPgpData() throws IOException { byte[] randomBytes = new byte[1000000]; RANDOM.nextBytes(randomBytes);