Skip to content

Commit

Permalink
Move tests to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmior committed Dec 13, 2024
1 parent 0f8e3e7 commit be59928
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 48 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
scala_version: [2.13.2, 2.12.11]
platform: [jvm, js]
env:
PLATFORM: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: zulu:8.0.432
apps: sbt scala

- name: JS Tests
if: ${{ matrix.platform != 'js' }}
run: sbt "++${{ matrix.scala_version }}" testsJS/test propsJS/test

- name: JVM Tests
if: ${{ matrix.platform != 'jvm' }}
run: sbt "++${{ matrix.scala_version }}" testsJVM/test propsJVM/test

- name: Clean up
run: |
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
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://api.travis-ci.org/non/antimirov.svg)](https://travis-ci.org/non/antimirov)
[![CI](https://github.com/non/antimirov/actions/workflows/ci.yml/badge.svg)](https://github.com/non/antimirov/actions/workflows/ci.yml)
[![codecov.io](http://codecov.io/github/non/antimirov/coverage.svg?branch=master)](http://codecov.io/github/non/antimirov?branch=master)

## Antimirov
Expand Down
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ReleaseTransformations._
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
import org.scalajs.jsenv.nodejs.NodeJSEnv

def ScalaCheck = Def.setting("org.scalacheck" %%% "scalacheck" % "1.14.3")
def ScalaProps = Def.setting("com.github.scalaprops" %%% "scalaprops" % "0.8.0")
Expand Down Expand Up @@ -103,7 +104,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform)
Global / scalaJSStage := FastOptStage,
parallelExecution := false,
coverageEnabled := false,
jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv())
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))))

lazy val coreJVM = core.jvm
lazy val coreJS = core.js
Expand All @@ -120,7 +121,7 @@ lazy val check = crossProject(JSPlatform, JVMPlatform)
Global / scalaJSStage := FastOptStage,
parallelExecution := false,
coverageEnabled := false,
jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv())
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))))

lazy val checkJVM = check.jvm
lazy val checkJS = check.js
Expand All @@ -141,7 +142,7 @@ lazy val props = crossProject(JSPlatform, JVMPlatform)
.jsSettings(
Global / scalaJSStage := FastOptStage,
coverageEnabled := false,
jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv())
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))))

lazy val propsJVM = props.jvm
lazy val propsJS = props.js
Expand All @@ -159,7 +160,7 @@ lazy val tests = crossProject(JSPlatform, JVMPlatform)
Global / scalaJSStage := FastOptStage,
parallelExecution := false,
coverageEnabled := false,
jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv())
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))))

lazy val testsJVM = tests.jvm
lazy val testsJS = tests.js
Expand Down

0 comments on commit be59928

Please sign in to comment.