Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate check RRs for 2.1.x to GitHub Actions #639

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]

- 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
28 changes: 24 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,44 @@ 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"
- "#changes-requested-reviews-by=0"
- label!=status:block-merge
- label=status:merge-when-green
actions:
merge:
queue:
method: merge
name: 2-1-x

- 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 Down