Update scalafmt-core to 3.8.5 #369
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scala CI | |
on: | |
push: | |
branches: [main] | |
tags: ["*"] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
jvm: ["11", "17"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: ${{ matrix.jvm }} | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 19 | |
- name: Install dependencies | |
run: npm install | |
- name: Cache packages | |
uses: coursier/cache-action@v6 | |
id: coursier-cache | |
- name: Check Formatting | |
run: ./mill Alias/run checkfmt | |
if: startsWith(matrix.jvm, '17') | |
- name: Run tests for all versions | |
run: ./mill Alias/run testall | |
code-coverage: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- name: Cache packages | |
uses: coursier/cache-action@v6 | |
id: coursier-cache | |
- name: Run code coverage | |
run: ./mill Alias/run coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
publish-snapshot: | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Cache packages | |
uses: coursier/cache-action@v6 | |
id: coursier-cache | |
- name: Publish | |
run: ./mill Alias/run pub | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
publish-release: | |
needs: [test] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: contains(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Cache packages | |
uses: coursier/cache-action@v6 | |
id: coursier-cache | |
- name: Publish | |
run: ./mill Alias/run pub | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
- name: Publish release from tag | |
uses: ghalactic/github-release-from-tag@v5 | |
with: | |
generateReleaseNotes: "true" | |
prerelease: "false" | |
draft: "false" |