From f3b8611c5c35dccd2281949176f6459638f4c816 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Mon, 2 May 2022 16:12:50 -0500 Subject: [PATCH 1/5] Adding GitHub Actions --- .github/workflows/build-test.yml | 48 ++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 15 ++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/build-test.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..8f5a0480 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,48 @@ +name: Check + +on: + pull_request: + +concurrency: + # Only run once for latest commit per ref and cancel other (previous) runs. + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + check-code-style: + name: Code Style + uses: playframework/.github/.github/workflows/sbt.yml@v1 + with: + cmd: sbt scalafmtCheckAll scalafmtSbtCheck + + check-binary-compatibility: + name: Binary Compatibility + uses: playframework/.github/.github/workflows/binary-check.yml@v1 + with: + cmd: sbt mimaReportBinaryIssues + + check-docs: + name: Docs + uses: playframework/.github/.github/workflows/sbt.yml@v1 + with: + cmd: sbt docs/scalafmtCheckAll docs/scalafmtSbtCheck docs/test docs/validateDocs + + tests: + name: Tests + needs: # Waiting more lightweight checks + - "check-code-style" + - "check-binary-compatibility" + - "check-docs" + uses: playframework/.github/.github/workflows/sbt-matrix.yml@v1 + with: + java: >- + [ "11", "8" ] + scala: >- + [ "2.12.15", "2.13.8" ] + cmd: sbt ++$SCALA_VERSION test + + finish: + name: Finish + needs: # Should be last + - "tests" + uses: playframework/.github/.github/workflows/rtm.yml@v1 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..12b1a65a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,15 @@ +name: Publish + +on: + push: + tags: ["*"] # Releases + +jobs: + publish-artifacts: + name: Publish / Artifacts + uses: playframework/.github/.github/workflows/publish.yml@v1 + secrets: + username: ${{ secrets.SONATYPE_USERNAME }} + password: ${{ secrets.SONATYPE_PASSWORD }} + pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }} + pgp_secret: ${{ secrets.PGP_SECRET }} \ No newline at end of file From 58479c2a2c11eca28f61c04791dddbbd48ef3d85 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Mon, 2 May 2022 16:14:42 -0500 Subject: [PATCH 2/5] Removing travis config --- .travis.yml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e68ff9c1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: scala - -scala: -- 2.12.15 -- 2.13.8 - - -git: - depth: false # Avoid sbt-dynver not seeing the tag - -env: - - TRAVIS_JDK=8 - - TRAVIS_JDK=11 - -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 - -script: - - sbt ++$TRAVIS_SCALA_VERSION scalafmtCheckAll scalafmtSbtCheck mimaReportBinaryIssues - - sbt ++$TRAVIS_SCALA_VERSION docs/scalafmtCheckAll docs/scalafmtSbtCheck docs/test docs/validateDocs - -cache: - directories: - - $HOME/.cache/coursier - - $HOME/.ivy2/cache - - $HOME/.jabba/jdk - - $HOME/.sbt - - $HOME/.coursier - -before_cache: - # Ensure changes to the cache aren't persisted - - rm -rf $HOME/.ivy2/cache/com.typesafe.play/play-slick* - # Delete all ivydata files since ivy touches them on each build - - find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/d2c8a242a2615f659595 - on_success: always - on_failure: always From 860b8d03a2033324a9a6f25425e76ba81cac8596 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Mon, 2 May 2022 16:19:06 -0500 Subject: [PATCH 3/5] Updating docs and mergify --- .github/workflows/build-test.yml | 3 +++ .mergify.yml | 4 ++-- README.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 8f5a0480..0d25f0b0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -3,6 +3,9 @@ name: Check on: pull_request: + schedule: + - cron: "0 4 * * *" # Nightly build (@daily) + concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. group: ci-${{ github.ref }} diff --git a/.mergify.yml b/.mergify.yml index 93083e96..e327a4c0 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,8 +2,8 @@ pull_request_rules: - name: Merge PRs that are ready conditions: - - status-success=Travis CI - Pull Request - - status-success=typesafe-cla-validator + - check-success~=/ Ready To Merge$ + - check-success=typesafe-cla-validator - "#approved-reviews-by>=1" - "#review-requested=0" - "#changes-requested-reviews-by=0" diff --git a/README.md b/README.md index 071519e6..995bbd8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Play Slick -[![Build Status](https://travis-ci.org/playframework/play-slick.png?branch=main)](https://travis-ci.org/playframework/play-slick) [![codecov.io](https://codecov.io/github/playframework/play-slick/coverage.svg?branch=main)](https://codecov.io/github/playframework/play-slick?branch=main) +[![Build Status](https://github.com/playframework/play-slick/actions/workflows/build-test.yml/badge.svg)](https://github.com/playframework/play-slick/actions/workflows/build-test.yml) The Play Slick module makes [Slick] a first-class citizen of [Play]. It consists of two features: From 76325d6833b5184e0d7b318643f0799f92f24941 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Mon, 2 May 2022 16:28:21 -0500 Subject: [PATCH 4/5] Fixing bincompat config --- .github/workflows/build-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0d25f0b0..148f1a9b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,8 +21,6 @@ jobs: check-binary-compatibility: name: Binary Compatibility uses: playframework/.github/.github/workflows/binary-check.yml@v1 - with: - cmd: sbt mimaReportBinaryIssues check-docs: name: Docs From e1c83f4fe9b32547655bcedfded767aaea7dfec3 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Tue, 3 May 2022 10:23:17 -0500 Subject: [PATCH 5/5] PR Feedback --- .github/workflows/build-test.yml | 7 ++++--- .github/workflows/publish.yml | 4 +++- .mergify.yml | 12 ++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 148f1a9b..fc1b3c5e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -3,8 +3,9 @@ name: Check on: pull_request: - schedule: - - cron: "0 4 * * *" # Nightly build (@daily) + push: + branches: + - main # Check main branch after merge concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. @@ -46,4 +47,4 @@ jobs: name: Finish needs: # Should be last - "tests" - uses: playframework/.github/.github/workflows/rtm.yml@v1 \ No newline at end of file + uses: playframework/.github/.github/workflows/rtm.yml@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 12b1a65a..f0004ffe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,8 @@ name: Publish on: push: + branches: # Snapshots + - main tags: ["*"] # Releases jobs: @@ -12,4 +14,4 @@ jobs: username: ${{ secrets.SONATYPE_USERNAME }} password: ${{ secrets.SONATYPE_PASSWORD }} pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }} - pgp_secret: ${{ secrets.PGP_SECRET }} \ No newline at end of file + pgp_secret: ${{ secrets.PGP_SECRET }} diff --git a/.mergify.yml b/.mergify.yml index e327a4c0..ecbefc9f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,3 +1,8 @@ +queue_rules: + - name: default + conditions: + # Conditions to get out of the queue (= merged) + - check-success~=/ Ready To Merge$ pull_request_rules: - name: Merge PRs that are ready @@ -10,11 +15,14 @@ pull_request_rules: - label!=status:block-merge - label=status:merge-when-green actions: - merge: + queue: method: merge - + name: default + - name: Delete the PR branch after merge conditions: - merged actions: delete_head_branch: {} + label: + remove: [ "status:merge-when-green" ] \ No newline at end of file