Skip to content

Update scalafmt-core to 3.11.1 #1492

Update scalafmt-core to 3.11.1

Update scalafmt-core to 3.11.1 #1492

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
src:
- '.github/workflows/test.yml'
- 'project/**'
- '**.scala'
- '**.sbt'
- '**.conf'
- '**.json'
- '**.js'
- '**.html'
- '**.css'
- '**.ts'
- 'pnpm-lock.yaml'
- SCALA_VERSION
code_format:
name: Code format
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: scalafmt
run: ./sbt scalafmtCheckAll
test_scala_3:
name: Scala 3
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
cache: sbt
- name: Scala 3.x test
run: JVM_OPTS="-Xms2g -Xmx4g" ./sbt "projectJVM/test"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/test-reports/TEST-*.xml'
check_name: Test Report Scala 3.x
annotate_only: true
detailed_summary: true
test_js:
name: Scala.js
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- name: Scala.js test
run: NODE_OPTIONS=--max-old-space-size=4096 JVM_OPTS=-Xmx4g ./sbt "projectJS/test"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/test-reports/TEST-*.xml'
check_name: Test Report Scala.js
annotate_only: true
detailed_summary: true
test_native_3:
name: Scala Native
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
- name: Install libcurl
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Scala Native test
run: JVM_OPTS=-Xmx4g ./sbt "projectNative/test"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/test-reports/TEST-*.xml'
check_name: Test Report Scala Native
annotate_only: true
detailed_summary: true
package_src:
name: Verify packageSrc
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- name: Install libcurl
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Verify packageSrc (detect cross-platform class name conflicts)
run: ./sbt "projectJVM/packageSrc" "projectJS/packageSrc" "projectNative/packageSrc"
test_sbt_plugin:
name: sbt plugin scripted test
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
cache: sbt
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Publish uni locally and get version
id: publish
run: |
./sbt "coreJVM/publishLocal; uniJVM/publishLocal"
UNI_VERSION=$(./sbt "print uniJVM/version" 2>/dev/null | sed 's/\x1b\[[0-9;]*m//g' | grep -E '^[0-9]' | tail -1 | tr -d '[:space:]')
echo "UNI_VERSION=${UNI_VERSION}"
echo "UNI_VERSION=${UNI_VERSION}" >> "$GITHUB_OUTPUT"
- name: Build and test sbt plugin
working-directory: sbt-uni
run: |
echo "Using UNI_VERSION=${{ steps.publish.outputs.UNI_VERSION }}"
UNI_VERSION=${{ steps.publish.outputs.UNI_VERSION }} sbt "publishLocal; scripted"
test_integration:
name: Integration test
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '23'
- name: Integration test
run: ./sbt "integrationTest/test"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/test-reports/TEST-*.xml'
check_name: Test Report Integration
annotate_only: true
detailed_summary: true