GH Actions: Run validatePullRequest and MiMa (#30557)
* GH Actions: run validatePullRequest instead of just compiling the tests * Run MiMa checks on GH Actions instead of Travis CI * Some clear names for workflow and steps * Add cache to bin compat step * Also run MiMa for master branch and tags * Use JDK 8 to validate pull request * Move validateCompile to pull request validation Also remove `update` and `Test/compile` from binary compatibility checks: - `validateCompile` runs for all configurations, so it overrides `Test/compile` - `update` is unnecessary for mima checks
This commit is contained in:
parent
26e03f5dd3
commit
edb3a654d0
3 changed files with 46 additions and 61 deletions
37
.github/workflows/binary-compatibility-checks.yml
vendored
Normal file
37
.github/workflows/binary-compatibility-checks.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Binary Compatibility
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v2.6.*
|
||||
|
||||
jobs:
|
||||
check-binary-compatibility:
|
||||
name: Check / Binary Compatibility
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
# The versions of scala specified here are only used as `-Dakka.build.scalaVersion=...`
|
||||
# which ignores the PATCH portion of the version id. These Scala versions don't need
|
||||
# to be fully defined here then since Akka build handles which patch version will be used.
|
||||
scalaVersion: [ "2.12", "2.13" ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
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: Set up JDK 8
|
||||
uses: olafurpg/setup-scala@v10
|
||||
with:
|
||||
java-version: adopt@1.8.0
|
||||
|
||||
- name: Cache Coursier cache
|
||||
uses: coursier/cache-action@v6.2
|
||||
|
||||
- name: Report MiMa Binary Issues
|
||||
run: sbt -jvm-opts .jvmopts-ci -Dakka.build.scalaVersion=${{ matrix.scalaVersion }} mimaReportBinaryIssues
|
||||
21
.github/workflows/build-test-prValidation.yml
vendored
21
.github/workflows/build-test-prValidation.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: PRValidation Workflow
|
||||
name: Pull Requests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
@ -10,7 +10,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
check-code-style:
|
||||
name: Checks
|
||||
name: Check / Code Style
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -32,8 +32,6 @@ jobs:
|
|||
|
||||
- name: Code style check
|
||||
run: |-
|
||||
# MiMa is disabled in GHActions because it's already covered in Travis builds (travis runs for multiple scala versions)
|
||||
# FIXME move MiMa checks to GHActions
|
||||
sbt -jvm-opts .jvmopts-ci \
|
||||
-Dakka.mima.enabled=false \
|
||||
-Dakka.ci-server=true \
|
||||
|
|
@ -43,10 +41,10 @@ jobs:
|
|||
-Dsbt.override.build.repos=false \
|
||||
-Dsbt.log.noformat=false \
|
||||
-Dakka.log.timestamps=true \
|
||||
scalafmtCheckAll scalafmtSbtCheck
|
||||
scalafmtCheckAll scalafmtSbtCheck headerCheckAll
|
||||
|
||||
Check-Publish:
|
||||
name: Check publishing locally
|
||||
check-publish:
|
||||
name: Check / Publish Local
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -79,8 +77,8 @@ jobs:
|
|||
publishLocal publishM2
|
||||
|
||||
|
||||
PR-Validation:
|
||||
name: PR Validation
|
||||
pull-request-validation:
|
||||
name: Check / Tests
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -97,8 +95,7 @@ jobs:
|
|||
- name: Cache Coursier cache
|
||||
uses: coursier/cache-action@v6.2
|
||||
|
||||
- name: Akka validatePR
|
||||
# FIXME: Change this to validatePullRequest
|
||||
- name: sbt validatePullRequest
|
||||
run: |-
|
||||
sbt -jvm-opts .jvmopts-ci \
|
||||
-Dakka.mima.enabled=false \
|
||||
|
|
@ -111,7 +108,7 @@ jobs:
|
|||
-Dakka.test.multi-node=false \
|
||||
-Dsbt.log.noformat=false \
|
||||
-Dakka.log.timestamps=true \
|
||||
Test/compile
|
||||
validateCompile validatePullRequest
|
||||
|
||||
## https://github.com/akka/akka/issues/30459
|
||||
## if success
|
||||
|
|
|
|||
49
.travis.yml
49
.travis.yml
|
|
@ -1,49 +0,0 @@
|
|||
version: ~> 1.0
|
||||
|
||||
language: scala
|
||||
|
||||
sudo: false
|
||||
|
||||
## The versions of scala specified here are only used as `-Dakka.build.scalaVersion=...`
|
||||
## which ignores the PATCH portion of the version id. These scala version don't need
|
||||
## to align with the version used in the build.
|
||||
scala:
|
||||
- "2.12.11"
|
||||
- "2.13.3"
|
||||
|
||||
before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
|
||||
install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- graphviz
|
||||
|
||||
before_cache:
|
||||
- find $HOME/.ivy2 -name "ivydata-*.properties" -print -delete
|
||||
- find $HOME/.sbt -name "*.lock" -print -delete
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/coursier
|
||||
- $HOME/.ivy2/cache
|
||||
- $HOME/.sbt
|
||||
- $HOME/.jabba/jdk
|
||||
|
||||
# script for the default 'test' stage:
|
||||
script: sbt -jvm-opts .jvmopts-ci -Dakka.build.scalaVersion=$TRAVIS_SCALA_VERSION ";update ;mimaReportBinaryIssues ;test:compile ;validateCompile ;headerCheckAll"
|
||||
|
||||
stages:
|
||||
- name: test
|
||||
if: type == pull_request OR NOT tag =~ ^v
|
||||
|
||||
env:
|
||||
global:
|
||||
- TRAVIS_JDK=8
|
||||
|
||||
# safelist
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- release-2.5
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
Loading…
Add table
Add a link
Reference in a new issue