diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..56772d5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Continuous Integration + +on: + pull_request: + branches: ['**'] + push: + branches: ['**'] + tags: [v*] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Build and Test + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + cache: sbt + + - shell: bash + run: sbt compile + + - shell: bash + run: sbt sbt-paradox-material-theme/scripted diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 23960e1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: scala -jdk: oraclejdk8 -scala: 2.12.6 -script: sbt verify - -cache: - directories: - - $HOME/.ivy2/cache - - $HOME/.sbt - -before_cache: - - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete - - find $HOME/.sbt -name "*.lock" -print -delete - -notifications: - email: - on_success: never diff --git a/build.sbt b/build.sbt index eaf21d2..873efec 100644 --- a/build.sbt +++ b/build.sbt @@ -11,6 +11,8 @@ lazy val root = project("paradox-material-theme-parent", file(".")) Compile / paradoxNavigationDepth := 3, makeSite := makeSite.dependsOn(Compile / paradox).value, paradoxMaterialTheme / version := version.value, + // this is to avoid triggering update, which will fail + Compile / compile := sbt.internal.inc.Analysis.empty, Compile / paradoxProperties ++= Map( "project.name" -> "Paradox Material Theme", "github.base_url" -> "https://github.com/sbt/sbt-paradox-material-theme" @@ -70,7 +72,6 @@ lazy val plugin = project("sbt-paradox-material-theme", file("plugin")) addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.4.4"), libraryDependencies += "org.jsoup" % "jsoup" % "1.10.3", libraryDependencies += "io.circe" %% "circe-core" % "0.9.3", - update := update.dependsOn(theme / publishLocal).value, Compile / resourceGenerators += Def.task { val file = (Compile / resourceManaged).value / "paradox-material-theme.properties" IO.write(file, s"version=${version.value}")