Skip to content

Commit

Permalink
ci: renovate GH workflows (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru authored Dec 5, 2022
1 parent bba266c commit 0b626be
Show file tree
Hide file tree
Showing 13 changed files with 136 additions and 97 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ on:
pull_request:
push:
branches:
- main
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
check-code-style:
name: Check Code Style
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
Expand All @@ -25,13 +28,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Cache Coursier cache
uses: coursier/[email protected]

- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
uses: coursier/setup-[email protected]
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
jvm: temurin:1.11.0

- name: Code style check and binary-compatibility check
# Run locally with: sbt 'verifyCodeStyle ; mimaReportBinaryIssues'
Expand All @@ -42,7 +45,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -52,13 +55,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Cache Coursier cache
uses: coursier/[email protected]

- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
uses: coursier/setup-[email protected]
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
jvm: temurin:1.11.0

- name: Compile all code with fatal warnings for Java 11, Scala 2.12 and Scala 2.13
# Run locally with: sbt 'clean ; +Test/compile ; +It/compile'
Expand All @@ -69,7 +72,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -79,13 +82,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Cache Coursier cache
uses: coursier/[email protected]

- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
uses: coursier/setup-[email protected]
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
jvm: temurin:1.11.0

- name: Create all API docs for artifacts/website and all reference docs
run: sbt docs/paradox
11 changes: 7 additions & 4 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@ on:
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday

permissions:
contents: read

jobs:
fossa:
name: Fossa
runs-on: ubuntu-latest
if: github.repository == 'akka/akka-persistence-jdbc'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0

- name: Cache Coursier cache
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.0

- name: Set up JDK 11
uses: coursier/setup-action@v1
uses: coursier/setup-action@v1.3.0
with:
jvm: adopt:11
jvm: temurin:1.11.0

- name: FOSSA policy check
run: |-
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/h2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
pull_request:
push:
branches:
- main
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
test:
name: Build and Test
Expand All @@ -16,13 +19,21 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: [email protected], scala-version: 2.12.x, sbt-opts: '' }
- { java-version: [email protected], scala-version: 2.13.x, sbt-opts: '' }
- { java-version: [email protected], scala-version: 2.12.x, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: [email protected], scala-version: 2.13.x, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
# leaving out some combinations (note that `checks.yml` doesn't run H2 test)
- { scalaVersion: "2.12", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' }
- { scalaVersion: "2.12", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
# { scalaVersion: "2.12", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' }

- { scalaVersion: "2.13", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' }
# { scalaVersion: "2.13", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { scalaVersion: "2.13", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' }

# { scalaVersion: "3.1", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' }
# { scalaVersion: "3.1", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
# { scalaVersion: "3.1", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' }
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -32,16 +43,16 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Setup JDK ${{ matrix.java-version }}
uses: olafurpg/setup-scala@v10
with:
java-version: ${{ matrix.java-version }}

- name: Cache Coursier cache
uses: coursier/cache-action@v5
uses: coursier/[email protected]

- name: Set up JDK ${{ matrix.jdkVersion }}
uses: coursier/[email protected]
with:
jvm: ${{ matrix.jvmName }}

- name: Run tests with Scala ${{ matrix.scala-version }} and Java ${{ matrix.java-version }}
run: sbt "++${{ matrix.scala-version }} test" ${{ matrix.sbt-opts }}
- name: Run tests with Scala ${{ matrix.scalaVersion }} on JDK ${{ matrix.jdkVersion }}
run: sbt "++ ${{ matrix.scalaVersion }} test" ${{ matrix.extraOpts }}

- name: Print logs on failure
if: ${{ failure() }}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/link-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ on:
schedule:
- cron: '0 6 * * 1'

permissions:
contents: read

jobs:
validate-links:
runs-on: ubuntu-22.04
if: github.repository == 'akka/akka-persistence-jdbc'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
# See https://github.com/actions/checkout/issues/299#issuecomment-677674415
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -22,12 +25,12 @@ jobs:
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*

- name: Cache Coursier cache
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.0

- name: Set up JDK 11 and Coursier
uses: coursier/setup-action@v1
- name: Set up JDK 11
uses: coursier/setup-action@v1.3.0
with:
jvm: adopt:11
jvm: temurin:1.11.0
apps: cs

- name: sbt site
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/mysql-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
pull_request:
push:
branches:
- main
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
integration-test:
name: Integration Tests
Expand All @@ -21,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -31,13 +34,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK [email protected]
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
uses: coursier/[email protected]

- name: Set up JDK 11
uses: coursier/[email protected]
with:
jvm: temurin:1.11.0

- name: Start docker
run: ./scripts/launch-mysql.sh
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/oracle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
pull_request:
push:
branches:
- main
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
integration-test:
name: Integration Tests
Expand All @@ -21,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -31,13 +34,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK [email protected]
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
uses: coursier/[email protected]

- name: Set up JDK 11
uses: coursier/[email protected]
with:
jvm: temurin:1.11.0

- name: Start docker
run: ./scripts/launch-oracle.sh
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/postgres-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
pull_request:
push:
branches:
- main
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
integration-test:
name: Integration Tests
Expand All @@ -21,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -31,13 +34,13 @@ jobs:
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK [email protected]
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]

- name: Cache Coursier cache
uses: coursier/cache-action@v5
uses: coursier/[email protected]

- name: Set up JDK 11
uses: coursier/[email protected]
with:
jvm: temurin:1.11.0

- name: Start docker
run: ./scripts/launch-postgres.sh
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
- main
- release-*

permissions:
contents: read

jobs:
update_release_draft:
runs-on: ubuntu-22.04
if: github.repository == 'akka/akka-persistence-jdbc'
permissions:
contents: write
steps:
# Drafts your next Release notes as Pull Requests are merged
# https://github.com/raboof/release-drafter/releases
# fork of https://github.com/release-drafter/release-drafter/releases
- uses: raboof/release-drafter@v5
# https://github.com/release-drafter/release-drafter/releases
# v5.21.1
- uses: release-drafter/release-drafter@6df64e4ba4842c203c604c1f45246c5863410adb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 0b626be

Please sign in to comment.