diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..aebe5b9a7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: CI +on: [pull_request] +jobs: + ci: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + scala: [2.13.3, 2.12.12] + nodejs: [14.15.1, 12.19.1, 10.23.0] + steps: + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.11 + - uses: coursier/cache-action@v5 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.nodejs }} + - run: npm install + - name: Run Tests + run: sbt ++${{ matrix.scala }} test + env: + NODEJS_VERSION: ${{ matrix.nodejs }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 2bf6fcf73..e86ee4341 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -6,10 +6,10 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v1 - - uses: olafurpg/setup-scala@v5 + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v10 - name: Check Scalafmt/Scaladoc - run: sbt ++2.13.3 scalafmtSbtCheck scalafmtCheck test:scalafmtCheck nodejs_v14/doc core/doc + run: sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck nodejs_v14/doc core/doc - name: Install NPM deps run: npm install - name: Check README diff --git a/.mergify.yml b/.mergify.yml index 11a259cd8..9e342ce37 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,7 +2,7 @@ pull_request_rules: - name: Automatic merge on approval conditions: - "author=scala-steward" - - "status-success=Travis CI - Pull Request" + - "status-success=CI" - "status-success=format" actions: merge: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9120fb50c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -dist: xenial -language: scala - -scala: - - 2.12.12 - - 2.13.3 - -jdk: - - openjdk11 - -env: - matrix: - - TRAVIS_NODE_VERSION="14.14.0" - - TRAVIS_NODE_VERSION="12.19.0" - - TRAVIS_NODE_VERSION="10.22.1" - -script: - - sbt ++$TRAVIS_SCALA_VERSION test - -install: - - rm -rf ~/.nvm && - git clone https://github.com/nvm-sh/nvm.git ~/.nvm && - (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && - source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION - -before_cache: - - rm -fv $HOME/.ivy2/.sbt.ivy.lock - - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete - - find $HOME/.cache/coursier -name "*.lock" -print -delete - - find $HOME/.sbt -name "*.lock" -print -delete - -cache: - directories: - - $HOME/.ivy2 - - $HOME/.cache/coursier - - $HOME/.sbt diff --git a/build.sbt b/build.sbt index 66d7778f7..b9ba6e5bd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,5 @@ organization in ThisBuild := "net.exoego" +crossScalaVersions in ThisBuild := Seq("2.13.3", "2.12.12") lazy val root = { val p = (project in file(".")) @@ -9,9 +10,9 @@ lazy val root = { .settings( name := "scala-js-nodejs" ) - val travisNodeVersion = Option(System.getenv("TRAVIS_NODE_VERSION")).filter(_.nonEmpty).getOrElse("") - if (travisNodeVersion.startsWith("10.")) p.aggregate(nodejs_v10) - else if (travisNodeVersion.startsWith("12.")) p.aggregate(nodejs_v10, nodejs_v12) + val nodejsVersion = Option(System.getenv("NODEJS_VERSION")).filter(_.nonEmpty).getOrElse("") + if (nodejsVersion.startsWith("10.")) p.aggregate(nodejs_v10) + else if (nodejsVersion.startsWith("12.")) p.aggregate(nodejs_v10, nodejs_v12) else p.aggregate(nodejs_v10, nodejs_v12, nodejs_v14) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 957713f77..d8e682041 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,3 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")