From 1bda97e43d60be02f30b87e892ad48e8d6c0a2dd Mon Sep 17 00:00:00 2001 From: "lucuma-steward[bot]" <106720676+lucuma-steward[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:23:54 +0000 Subject: [PATCH 1/2] Update sbt-lucuma-lib to 0.12.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 078a67a..25a2cc0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.10.13") +addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.12.4") From 8ad6e0ddf9b149c9f21d1c562b5f70842631cff4 Mon Sep 17 00:00:00 2001 From: "lucuma-steward[bot]" <106720676+lucuma-steward[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:24:08 +0000 Subject: [PATCH 2/2] Run prePR with sbt-typelevel Executed command: sbt tlPrePrBotHook --- .github/workflows/ci.yml | 133 +++++++++++++++++---------------------- .mergify.yml | 2 +- .scalafmt-common.conf | 5 +- 3 files changed, 61 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1f4116..a37232c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,79 +15,72 @@ 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: [2.12.17] + scala: [2.12] java: [temurin@17] runs-on: ${{ matrix.os }} + timeout-minutes: 60 steps: + - name: Install sbt + uses: sbt/setup-sbt@v1 + - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 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 + uses: actions/setup-java@v4 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 +update - name: Check that workflows are up to date run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@17' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck lucumaScalafmtCheck lucumaScalafixCheck - - name: Test - run: sbt '++ ${{ matrix.scala }}' test - - name: Check scalafix lints if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' 'scalafixAll --check' + - name: Test + run: sbt '++ ${{ matrix.scala }}' test + - name: Check binary compatibility if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues + - name: Generate API documentation + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + run: sbt '++ ${{ matrix.scala }}' doc + - name: Aggregate coverage reports run: sbt '++ ${{ matrix.scala }}' coverageReport coverageAggregate - name: Upload code coverage data - run: 'bash <(curl -s https://codecov.io/bash)' + uses: codecov/codecov-action@v4 publish: name: Publish Artifacts @@ -96,84 +89,72 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.17] java: [temurin@17] runs-on: ${{ matrix.os }} steps: + - name: Install sbt + uses: sbt/setup-sbt@v1 + - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download Java (temurin@17) - id: download-java-temurin-17 + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 if: matrix.java == 'temurin@17' - uses: typelevel/download-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 + cache: sbt - - name: Setup Java (temurin@17) - if: matrix.java == 'temurin@17' - uses: actions/setup-java@v3 - with: - distribution: jdkfile - java-version: 17 - jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} - - - 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 +update - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' - run: echo $PGP_SECRET | base64 -di | gpg --import + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + run: echo $PGP_SECRET | base64 -d -i - | 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_SECRET" | base64 -d -i - > /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 validate-steward: name: Validate Steward Config strategy: matrix: os: [ubuntu-latest] - scala: [2.13.6] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (fast) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Download Java (temurin@17) - id: download-java-temurin-17 - if: matrix.java == 'temurin@17' - uses: typelevel/download-java@v2 + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 17 - - - name: Setup Java (temurin@17) - if: matrix.java == 'temurin@17' - uses: actions/setup-java@v3 - with: - distribution: jdkfile - java-version: 17 - jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} + java-version: 11 - uses: coursier/setup-action@v1 with: diff --git a/.mergify.yml b/.mergify.yml index 24d22b4..5e7a97b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -13,6 +13,6 @@ pull_request_rules: - body~=labels:.*early-semver-patch - body~=labels:.*early-semver-minor - 'title=flake.lock: Update' - - status-success=Build and Test (ubuntu-latest, 2.12.17, temurin@17) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@17) actions: merge: {} diff --git a/.scalafmt-common.conf b/.scalafmt-common.conf index 0218680..18e403e 100644 --- a/.scalafmt-common.conf +++ b/.scalafmt-common.conf @@ -4,10 +4,11 @@ # 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.8.3" style = default -runner.dialect = scala213source3 +runner.dialect = scala3 +runner.optimizer.maxVisitsPerToken = 20000 # Avoids SearchStateExploded exceptions maxColumn = 100 project.git = true