Skip to content

Commit be59928

Browse files
committed
Move tests to GitHub Actions
1 parent 0f8e3e7 commit be59928

File tree

4 files changed

+51
-48
lines changed

4 files changed

+51
-48
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches:
10+
- master
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
scala_version: [2.13.2, 2.12.11]
17+
platform: [jvm, js]
18+
env:
19+
PLATFORM: ${{ matrix.platform }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
- name: Coursier cache
25+
uses: coursier/cache-action@v6
26+
- uses: coursier/setup-action@v1
27+
with:
28+
jvm: zulu:8.0.432
29+
apps: sbt scala
30+
31+
- name: JS Tests
32+
if: ${{ matrix.platform != 'js' }}
33+
run: sbt "++${{ matrix.scala_version }}" testsJS/test propsJS/test
34+
35+
- name: JVM Tests
36+
if: ${{ matrix.platform != 'jvm' }}
37+
run: sbt "++${{ matrix.scala_version }}" testsJVM/test propsJVM/test
38+
39+
- name: Clean up
40+
run: |
41+
rm -rf "$HOME/.ivy2/local" || true
42+
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
43+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
44+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
45+
find $HOME/.sbt -name "*.lock" -delete || true

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

README.md

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

44
## Antimirov

build.sbt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import ReleaseTransformations._
22
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
3+
import org.scalajs.jsenv.nodejs.NodeJSEnv
34

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

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

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

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

164165
lazy val testsJVM = tests.jvm
165166
lazy val testsJS = tests.js

0 commit comments

Comments
 (0)