Skip to content
Permalink
Browse files

Add Appveyor tests

  • Loading branch information...
alexarchambault committed Mar 25, 2019
1 parent ee763a2 commit 93e5bf04c09f641444819f3a0dcd1ef26b454066
Showing with 92 additions and 1 deletion.
  1. +34 −0 appveyor.yml
  2. +48 −0 examples/test.ipynb
  3. +10 −1 project/Settings.scala
@@ -0,0 +1,34 @@
version: '{build}'
os: Windows Server 2012
install:
- cmd: mkdir C:\utils
- cmd: curl -Lo C:\utils\sbt https://github.com/coursier/sbt-launcher/releases/download/v1.2.6/csbt
- cmd: curl -Lo C:\utils\sbt.bat https://github.com/coursier/sbt-launcher/releases/download/v1.2.6/csbt.bat
- cmd: curl -Lo C:\utils\coursier https://git.io/coursier-cli
- cmd: curl -Lo C:\utils\coursier.bat https://git.io/coursier-bat
- cmd: SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0
- cmd: SET PATH=C:\utils;%JAVA_HOME%\bin;%PATH%
- cmd: SET JAVA_OPTS=-Xmx4g -Xss2m -Dpublish.javadoc=0
- cmd: SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- "python --version"
- "python -m pip install --upgrade pip"
- "python -m pip install jupyter" # TODO freeze that for better reproducibility?
environment:
PYTHON: C:\Miniconda37-x64
TEST_SCALA_VERSION: 2.12.8
TEST_ALMOND_VERSION: 0.1.1-local

build_script:
- jupyter kernelspec list
- sbt "set version in ThisBuild := \"%TEST_ALMOND_VERSION%\"" ++%TEST_SCALA_VERSION% publishLocal

test_script:
- coursier bootstrap -r jitpack -i user -I user:sh.almond:scala-kernel-api_%TEST_SCALA_VERSION%:%TEST_ALMOND_VERSION% --sources --default=true --embed-files=false sh.almond:scala-kernel_%TEST_SCALA_VERSION%:%TEST_ALMOND_VERSION% -o launcher
- .\launcher --install
- jupyter kernelspec list
- jupyter nbconvert --to notebook --execute --ExecutePreprocessor.kernel_name=scala examples/test.ipynb --output=test-output.ipynb
- fc examples\test.ipynb examples\test-output.ipynb

branches:
only:
- master
@@ -0,0 +1,48 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\u001b[36mres0\u001b[39m: \u001b[32mInt\u001b[39m = \u001b[32m2\u001b[39m"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Scala",
"language": "scala",
"name": "scala"
},
"language_info": {
"codemirror_mode": "text/x-scala",
"file_extension": ".scala",
"mimetype": "text/x-scala",
"name": "scala",
"nbconvert_exporter": "script",
"version": "2.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
@@ -38,7 +38,16 @@ object Settings {
// with same major and minor numbers (e.g. 2.12.6 and 2.12.7)
publishConfiguration := publishConfiguration.value.withOverwrite(true),
exportVersionsSetting
)
) ++ {
val prop = sys.props.getOrElse("publish.javadoc", "").toLowerCase(java.util.Locale.ROOT)
if (prop == "0" || prop == "false")
Seq(
sources in (Compile, doc) := Seq.empty,
publishArtifact in (Compile, packageDoc) := false
)
else
Nil
}

lazy val dontPublish = Seq(
publish := {},

0 comments on commit 93e5bf0

Please sign in to comment.
You can’t perform that action at this time.