From 4fd42387760cc08d98bbdb5122f6e2bb640d2403 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Tue, 10 Oct 2023 15:46:47 -0700 Subject: [PATCH] Try enabling GH workflows --- .github/dependabot.yml | 10 +++++++++ .github/workflows/main.yml | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f6faee6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f15dcbb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: Build +on: + push: + branches: + - master + paths-ignore: + - "README.md" + - "release-notes/*" + pull_request: + branches: + - master +permissions: + contents: read +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Alas, JDK14 can't be yet used while build is for Java 6 + java_version: ['8', '11'] + os: ['ubuntu-20.04'] + env: + JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" + steps: + - uses: actions/checkout@v4.1.0 + - name: Set up JDK + uses: actions/setup-java@v3.13.0 + with: + distribution: "temurin" + java-version: ${{ matrix.java_version }} + cache: 'maven' + - name: Build + run: ./mvnw -B -q -ff -ntp verify + - name: Generate code coverage + if: github.event_name != 'pull_request' && matrix.java_version == '8' + run: ./mvnw -B -q -ff -ntp test + - name: Publish code coverage + if: github.event_name != 'pull_request' && matrix.java_version == '8' + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./target/site/jacoco/jacoco.xml + flags: unittests