From 0e7934c4ec0aecf13526ebedf07253da5f76f9d6 Mon Sep 17 00:00:00 2001 From: "lucuma-steward[bot]" <106720676+lucuma-steward[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:45:45 +0000 Subject: [PATCH 1/2] Update sbt-lucuma-lib to 0.11.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 3ccbae4e..f4af6014 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.10.13") +addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.11.1") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") From d5d7c87352fd0d1c54b12a5d0f42b4af3d9cf799 Mon Sep 17 00:00:00 2001 From: "lucuma-steward[bot]" <106720676+lucuma-steward[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:47:04 +0000 Subject: [PATCH 2/2] Run prePR with sbt-typelevel Executed command: sbt tlPrePrBotHook --- .github/workflows/ci.yml | 125 ++++++++++++++++++++++----------------- .mergify.yml | 8 +-- .scalafmt-common.conf | 4 +- 3 files changed, 77 insertions(+), 60 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4e5fbcd..d7c2e883 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,56 +15,42 @@ on: tags: [v*] env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.workflow }} @ ${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build and Test strategy: matrix: os: [ubuntu-latest] - scala: [3.2.2, 2.13.10] + scala: [3, 2.13] java: [temurin@17] project: [rootJS, rootJVM] runs-on: ${{ matrix.os }} + timeout-minutes: 60 steps: - name: Checkout current branch (full) uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Download Java (temurin@17) - id: download-java-temurin-17 - if: matrix.java == 'temurin@17' - uses: typelevel/download-java@v2 - with: - distribution: temurin - java-version: 17 - - name: Setup Java (temurin@17) + id: setup-java-temurin-17 if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: - distribution: jdkfile + distribution: temurin java-version: 17 - jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} + cache: sbt - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: sbt update + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update - run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'show coverageEnabled' @@ -75,6 +61,10 @@ jobs: if: matrix.java == 'temurin@17' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck lucumaScalafmtCheck lucumaScalafixCheck + - name: Check scalafix lints + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check' + - name: scalaJSLink if: matrix.project == 'rootJS' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult @@ -82,14 +72,14 @@ jobs: - name: Test run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - - name: Check scalafix lints - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' - run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check' - - name: Check binary compatibility if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues + - name: Generate API documentation + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc + - name: Aggregate coverage reports run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' coverageReport coverageAggregate @@ -103,7 +93,6 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.2.2] java: [temurin@17] runs-on: ${{ matrix.os }} steps: @@ -112,44 +101,72 @@ jobs: with: fetch-depth: 0 - - name: Download Java (temurin@17) - id: download-java-temurin-17 - if: matrix.java == 'temurin@17' - uses: typelevel/download-java@v2 - with: - distribution: temurin - java-version: 17 - - name: Setup Java (temurin@17) + id: setup-java-temurin-17 if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: - distribution: jdkfile + distribution: temurin java-version: 17 - jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} + cache: sbt - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: sbt update + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + run: sbt reload +update - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} run: echo $PGP_SECRET | base64 -di | gpg --import - name: Import signing key and strip passphrase if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} run: | echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) - name: Publish - run: sbt '++ ${{ matrix.scala }}' tlCiRelease + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} + run: sbt tlCiRelease + + dependency-submission: + name: Submit Dependencies + if: github.event_name != 'pull_request' + strategy: + matrix: + os: [ubuntu-latest] + java: [temurin@17] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + cache: sbt + + - name: sbt update + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + run: sbt '++ ${{ matrix.scala }}' reload +update + + - name: Submit Dependencies + uses: scalacenter/sbt-dependency-submission@v2 + with: + modules-ignore: root rootJS tests rootJVM rootNative + configs-ignore: test scala-tool scala-doc-tool diff --git a/.mergify.yml b/.mergify.yml index 49ef909b..06f3f95f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -13,10 +13,10 @@ pull_request_rules: - body~=labels:.*early-semver-patch - body~=labels:.*early-semver-minor - 'title=flake.lock: Update' - - status-success=Build and Test (ubuntu-latest, 3.2.2, temurin@17, rootJS) - - status-success=Build and Test (ubuntu-latest, 3.2.2, temurin@17, rootJVM) - - status-success=Build and Test (ubuntu-latest, 2.13.10, temurin@17, rootJS) - - status-success=Build and Test (ubuntu-latest, 2.13.10, temurin@17, rootJVM) + - status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJS) + - status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJVM) + - status-success=Build and Test (ubuntu-latest, 2.13, temurin@17, rootJS) + - status-success=Build and Test (ubuntu-latest, 2.13, temurin@17, rootJVM) actions: merge: {} - name: Label jts PRs diff --git a/.scalafmt-common.conf b/.scalafmt-common.conf index 0218680c..c90386c2 100644 --- a/.scalafmt-common.conf +++ b/.scalafmt-common.conf @@ -4,10 +4,10 @@ # this file by hand! Instead, if you wish to make changes, you should # make a PR to sbt-lucuma. -version = "3.7.2" +version = "3.7.4" style = default -runner.dialect = scala213source3 +runner.dialect = scala3 maxColumn = 100 project.git = true