Skip to content

Commit

Permalink
Merge branch 'series/4.x' into improve-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou authored Dec 30, 2024
2 parents bbd1760 + a0de903 commit a34efa5
Show file tree
Hide file tree
Showing 24 changed files with 428 additions and 284 deletions.
49 changes: 40 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,58 @@ jobs:
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v14
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Document Generation
run: ./sbt docs/compileDocs
run: sbt docs/compileDocs

lint:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check formatting
run: sbt fmt
- name: Check binary compatibility
run: sbt "++2.12; checkMima; ++2.13; checkMima; ++3.3; checkMima"

test:
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
java: ['[email protected]', '[email protected]']
scala: ['2.12.18', '2.13.12', '3.4.1']
java: ['11', '21']
scala: ['2.12.20', '2.13.15', '3.3.4']
platform: ['JS', 'JVM', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v14
- name: Setup Java
uses: actions/setup-[email protected]
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Run JS tests
Expand Down Expand Up @@ -76,8 +103,12 @@ jobs:
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v14
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Release artifacts
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
uses: actions/[email protected]
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- name: Setup JVM
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Check that site workflow is up to date
run: sbt docs/checkGithubWorkflow
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Check website build process
run: sbt docs/buildWebsite
run: sbt docs/buildWebsite
publish-docs:
name: Publish Docs
runs-on: ubuntu-latest
Expand All @@ -40,19 +40,21 @@ jobs:
uses: actions/[email protected]
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- name: Setup JVM
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
- name: Publish Docs to NPM Registry
run: sbt docs/publishToNpm
run: sbt docs/publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
generate-readme:
Expand All @@ -65,14 +67,16 @@ jobs:
with:
ref: ${{ github.head_ref }}
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- name: Setup JVM
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Generate Readme
run: sbt docs/generateReadme
run: sbt docs/generateReadme
- name: Commit Changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand Down
16 changes: 13 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ includeCurlyBraceInSelectChains = false
danglingParentheses.preset = true
optIn.annotationNewlines = true

rewrite.rules = [RedundantBraces]
rewrite.rules = [SortImports, RedundantBraces]
project.excludeFilters = [
"core/src/main/scala/zio/config/ProductBuilder.scala",
"core/src/test/scala/zio/config/ProductBuilderTest.scala",
"core/shared/src/main/scala-3.x/*",
"magnolia/shared/src/main/scala-dotty/*"
]

fileOverride {
"glob:**/scala-dotty/**" {
runner.dialect = scala3
}
"glob:**/scala-3.x/**" {
runner.dialect = scala3
}
"glob:**/project/**" {
runner.dialect = scala3
}
}
Loading

0 comments on commit a34efa5

Please sign in to comment.