diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml new file mode 100644 index 0000000..06ead64 --- /dev/null +++ b/.github/workflows/scala.yml @@ -0,0 +1,44 @@ +name: Scala CI + +on: +- push +- pull_request + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + scala: + - 2.12.15 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Need the git history for sbt-dynver to determine the version + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Cache SBT + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/local/ + ~/.ivy2/cache/ + ~/.sbt/ + ~/.coursier/ + key: | + ${{ runner.os }}-${{matrix.scala}}-${{ hashFiles('**/*.sbt') }} + ${{ runner.os }}-${{matrix.scala}}- + - name: Run tests + run: sbt ++${{ matrix.scala }} test + - name: Publish to Maven Central Repository + env: + GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} + if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' }} + run: sbt ++${{ matrix.scala }} "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ ${{ matrix.scala }}\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease diff --git a/.gitignore b/.gitignore index 3b70372..c7531c7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ local.sbt secret/ .metals/ .bloop/ +metals.sbt +.bsp/ +.vscode/launch.json +*.scala.semanticdb diff --git a/.gitpod.yml b/.gitpod.yml index 6db8e4c..cd17bda 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,4 +2,4 @@ image: igeolise/scalajs-test-runner:latest vscode: extensions: - scala-lang.scala@0.3.8:wQBBM+lKILHBqOqlqW60xA== - - scalameta.metals@1.6.0:Yi5jjDJjIyozrOuZIWFt/g== + - scalameta.metals@1.9.0:EyAIfy0ykjUn9htpw3f7GA== \ No newline at end of file diff --git a/.scalafmt.conf b/.scalafmt.conf index 5c84156..26467aa 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,2 +1,3 @@ -version = "2.3.2" -maxColumn = 120 +runner.dialect = "scala213" +version = "3.1.1" +maxColumn = 80 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 84284af..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -addons: - apt: - packages: - - graphviz - -language: scala - -scala: - - 2.12.10 - -jdk: - - openjdk8 - - openjdk9 - - openjdk11 - -before_cache: - - find $HOME/.sbt -name '*.lock' -delete - - find $HOME/.ivy2 -name 'ivydata-*.properties' -delete - -script: - - sbt +test - -cache: - directories: - - $HOME/.ivy2/cache - - $HOME/.sbt/boot/ - - $HOME/.coursier/ - -before_script: - -before_deploy: - -deploy: - - provider: script - script: sbt ++$TRAVIS_SCALA_VERSION "set every Seq(sonatypeSessionName := \"Travis Job $TRAVIS_JOB_NAME $TRAVIS_JOB_NUMBER ($TRAVIS_JOB_WEB_URL)\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease - skip_cleanup: true - on: - all_branches: true - condition: $GITHUB_PERSONAL_ACCESS_TOKEN - jdk: openjdk8 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..32cfc61 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.watcherExclude": { + "**/target": true + } +} \ No newline at end of file diff --git a/project/build.properties b/project/build.properties index 6624da7..10fd9ee 100755 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.5 +sbt.version=1.5.5 diff --git a/project/plugins.sbt b/project/plugins.sbt index f3fc71a..902486d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -addSbtPlugin("com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "7.2.0") +addSbtPlugin("com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "8.2.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")