Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Scala3 #349

Merged
merged 16 commits into from
Dec 3, 2022
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ jobs:
- java: 11
scala: 2.11.12
- java: 11
scala: 2.12.14
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update covered scala versions

scala: 2.12.16
- java: 11
scala: 2.13.6
scala: 2.13.8
- java: 11
scala: 3.2.1-RC1
runs-on: ubuntu-latest
env:
SCALAJS_TEST_OPT: full
# define Java options for both official sbt and sbt-extras
JAVA_OPTS: -Xms6G -Xmx6G -Xss4M -XX:ReservedCodeCacheSize=256M -XX:MaxMetaspaceSize=1G -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8
JVM_OPTS: -Xms6G -Xmx6G -Xss4M -XX:ReservedCodeCacheSize=256M -XX:MaxMetaspaceSize=1G -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8
SBT_OPTS: -Denumeratum.useLocalVersion
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -39,26 +42,23 @@ jobs:
sbt -v ++${{ matrix.scala }} scalafmtCheck scalafmtSbtCheck scala_2_11/test:compile scala_2_11/test:doc
sbt -v ++${{ matrix.scala }} scala_2_11/test
;;
2.12.14)
2.12.16)
sbt -v ++${{ matrix.scala }} test:compile test:doc
sbt -v ++${{ matrix.scala }} coverage test coverageReport
sbt -v ++${{ matrix.scala }} coverageAggregate
;;
2.13.6)
*)
sbt -v ++${{ matrix.scala }} test:compile test:doc
sbt -v ++${{ matrix.scala }} test
;;
*)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to fail there, SBT will anyway check whether the version selected by the CI is supported (and it avoid to hard code more cases)

echo unknown Scala Version ${{ matrix.scala }}
exit 1
esac
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
- name: Upload coverage to Codecov
if: ${{ matrix.scala == '2.12.14' }}
if: ${{ matrix.scala == '2.12.16' }}
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
9 changes: 8 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
version = 3.0.0-RC6
version = 3.5.8
runner.dialect = Scala213Source3
style = defaultWithAlign
maxColumn = 100

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