diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 884f8a41..1b53486b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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. @@ -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" @@ -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 }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5668bc2f..03d126e1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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: diff --git a/.mergify.yml b/.mergify.yml index d6d97843..586e48d5 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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" @@ -19,12 +38,13 @@ pull_request_rules: - 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