Skip to content

Commit

Permalink
Move to appveyor for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannic committed Apr 23, 2020
1 parent 3df6ee5 commit b368406
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 406 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
ref: ${{ github.ref }}
- name: Run tests
run: docker run --rm -v "$GITHUB_WORKSPACE":/opt -w /opt mrcide/squire:browser bash -c "npm install && npm run build && npm run test && npm run e2e"
run: docker run --rm -v "$GITHUB_WORKSPACE":/opt -w /opt mrcide/squire bash -c "npm install && npm run build && npm run test"
7 changes: 0 additions & 7 deletions Dockerfile.browser

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![unit tests](https://github.com/mrc-ide/squire_js/workflows/test/badge.svg?branch=master)
![Unit tests](https://github.com/mrc-ide/squire_js/workflows/test/badge.svg?branch=master)
[![Browser tests](https://ci.appveyor.com/api/projects/status/30os3uq8qpbfeb52/branch/master?svg=true)](https://ci.appveyor.com/project/giovannic/squire-js/branch/master)

# squire.js

Expand Down
47 changes: 47 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Download script file from GitHub
init:
ps: |
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:
- ps: Bootstrap
- ps: Install-Product node $env:NODE_VERSION

cache:
- C:\RLibrary

environment:
NOT_CRAN: true
nodejs_version: "LTS"
# env vars that may need to be set, at least temporarily, from time to time
# see https://github.com/krlmlr/r-appveyor#readme for details
# USE_RTOOLS: true
# R_REMOTES_STANDALONE: true

# Adapt as necessary starting from here

build_script:
- R -e "install.packages(c('V8', 'odin', 'deSolve', 'jsonlite', 'remotes'), repos = 'https://cloud.r-project.org/')"
- R -e "remotes::install_github(c('mrc-ide/odin.js', 'mrc-ide/squire@squire_js'))"
- npm install
- npm run build

test_script:
- npm run e2e

on_failure:
- 7z a failure.zip failure_*.json
- 7z a expected.zip data\output_*.json
- appveyor PushArtifact failure.zip
- appveyor PushArtifact expected.zip

artifacts:
- path: 'failure_*.json'
name: Logs

- path: 'data\output_*.json'
name: Logs

- path: 'build\squire.js'
name: Build
3 changes: 0 additions & 3 deletions e2e/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ const fs = require('fs')
const webdriver = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const rollup = require('rollup');
const chromedriver = require('chromedriver');
const tolerance = 1e-1;

chrome.setDefaultService(new chrome.ServiceBuilder(chromedriver.path).build());

let options = new chrome.Options();
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--disable-gpu");
Expand Down
Loading

0 comments on commit b368406

Please sign in to comment.