Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests to GitHub Actions #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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