Skip to content

Commit

Permalink
Migrate check RRs for 2.1.x to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Jan 20, 2022
1 parent d5a5c70 commit 37b533e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 6 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Pull Requests

on:
pull_request:
branches:
- main # Only `main` base branch, because `2.1.x` has another build logic

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
Expand Down Expand Up @@ -75,6 +73,7 @@ jobs:
run: sbt doc

tests:
if: ${{ github.base_ref != '2.1.x' }}
runs-on: ubuntu-20.04
needs: # Waiting more lightweight checks
- "check-code-style"
Expand Down Expand Up @@ -104,3 +103,35 @@ jobs:
run: sbt ++$SCALA_VERSION 'testOnly -- xonly timefactor 5'
env:
SCALA_VERSION: ${{ matrix.scala }}

tests-21x:
if: ${{ github.base_ref == '2.1.x' }}
runs-on: ubuntu-20.04
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
strategy:
matrix:
jdk: [ 11, 8 ]
scala: [ 2.12.15, 2.13.8 ] # Should be sync with Mergify conditions (.mergify.yml)
name: Check / Tests (Scala ${{ matrix.scala }} & JDK ${{ matrix.jdk }})
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 ${{ matrix.jdk }}
uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.${{ matrix.jdk }}

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

- name: Tests
run: sbt ++$SCALA_VERSION 'testOnly -- xonly timefactor 5'
env:
SCALA_VERSION: ${{ matrix.scala }}
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: # Snapshots
- main
# - 2.1.x # TODO: 2.1.x don't support sbt-ci-release yet
tags: ["*"] # Releases
tags-ignore: [ "2.1.*" ] # TODO: 2.1.x don't support sbt-ci-release yet

jobs:
publish-artifacts:
Expand Down
27 changes: 23 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,30 @@ queue_rules:
- check-success=Check / Docs
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 11\)$
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 8\)$
- name: 2-1-x
conditions:
# Conditions to get out of the queue (= merged)
- check-success=Check / Code Style
- check-success=Check / Binary Compatibility
- check-success=Check / Docs
- check-success~=^Check / Tests \(Scala 2\.12\.(\d+) & JDK 11\)$
- check-success~=^Check / Tests \(Scala 2\.12\.(\d+) & JDK 8\)$
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 11\)$
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 8\)$


pull_request_rules:
- name: Merge PRs that are ready
- name: Merge PRs for 2.1.x branch that are ready
conditions:
- base==2.1.x
- status-success=Travis CI - Pull Request
- check-success=Check / Code Style
- check-success=Check / Binary Compatibility
- check-success=Check / Docs
- check-success~=^Check / Tests \(Scala 2\.12\.(\d+) & JDK 11\)$
- check-success~=^Check / Tests \(Scala 2\.12\.(\d+) & JDK 8\)$
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 11\)$
- check-success~=^Check / Tests \(Scala 2\.13\.(\d+) & JDK 8\)$
- status-success=typesafe-cla-validator
- "#approved-reviews-by>=1"
- "#review-requested=0"
Expand All @@ -22,9 +41,9 @@ pull_request_rules:
merge:
method: merge

- name: Merge PRs for main branch that are ready
- name: Merge PRs (except 2.1.x branch) that are ready
conditions:
- base=main # TODO: remove this line and rule above after stable release 2.2.x
- base!=2.1.x
- status-success=Travis CI - Pull Request
- check-success=Check / Code Style
- check-success=Check / Binary Compatibility
Expand All @@ -40,7 +59,7 @@ pull_request_rules:
actions:
queue:
method: merge
name: default
name: 2-1-x

- name: Delete the PR branch after merge
conditions:
Expand Down

0 comments on commit 37b533e

Please sign in to comment.