Skip to content

Commit

Permalink
test: switch to circleci (#431)
Browse files Browse the repository at this point in the history
* test: switch to circle-ci

* docs: add circle-ci badge to readme

* fix: use manual install for circleci-matrix

* fix: babel-register -> babel-core/register

* fix: move install scripts to .circleci-matrix.yml

* fix: remove node_modules directory in scripts/circle/install.sh

* fix: export DATABASE_DRIVER in .circleci-matrix.yml
  • Loading branch information
zacharygolba authored Sep 30, 2016
1 parent 0a49d14 commit 856aeae
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 64 deletions.
8 changes: 8 additions & 0 deletions .circleci-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
env:
- export DATABASE_DRIVER=pg
- export DATABASE_DRIVER=mysql2
- export DATABASE_DRIVER=sqlite3
command:
- bash -e scripts/circle/before-script.sh
- npm test
- npm run test:codecov
51 changes: 0 additions & 51 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,6 +1,6 @@
# Lux

[![Build Status](https://travis-ci.org/postlight/lux.svg?branch=master)](https://travis-ci.org/postlight/lux) [![Build status](https://ci.appveyor.com/api/projects/status/xxwunscfe3rsxdmr/branch/master?svg=true)](https://ci.appveyor.com/project/zacharygolba/lux/branch/master) [![codecov](https://codecov.io/gh/postlight/lux/branch/master/graph/badge.svg)](https://codecov.io/gh/postlight/lux)
[![CircleCI](https://circleci.com/gh/postlight/lux/tree/master.svg?style=svg)](https://circleci.com/gh/postlight/lux/tree/master) [![Build status](https://ci.appveyor.com/api/projects/status/xxwunscfe3rsxdmr/branch/master?svg=true)](https://ci.appveyor.com/project/zacharygolba/lux/branch/master) [![codecov](https://codecov.io/gh/postlight/lux/branch/master/graph/badge.svg)](https://codecov.io/gh/postlight/lux)
[![Dependency Status](https://david-dm.org/postlight/lux.svg)](https://david-dm.org/postlight/lux) [![npm version](https://badge.fury.io/js/lux-framework.svg)](https://badge.fury.io/js/lux-framework) [![Join the chat at https://gitter.im/postlight/lux](https://badges.gitter.im/postlight/lux.svg)](https://gitter.im/postlight/lux?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A MVC style framework for building highly performant, large scale JSON APIs that anybody who knows the JavaScript language and its modern features will understand.
Expand Down
9 changes: 0 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
os: Visual Studio 2015

platform: x64

environment:
nodejs_version: 6
NODE_ENV: test
DATABASE_PASSWORD: Password12!

matrix:
- DATABASE_DRIVER: mysql2
DATABASE_USERNAME: root

- DATABASE_DRIVER: sqlite3

services:
- mysql

install:
- ps: C:\projects\lux\scripts\appveyor\install.ps1

before_test:
- ps: C:\projects\lux\scripts\appveyor\before-test.ps1

test_script:
- npm test

build: off
16 changes: 16 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
test:
override:
- ~/.local/bin/circleci-matrix
machine:
node:
version: 6
environment:
NODE_ENV: test
DATABASE_USERNAME: ubuntu
dependencies:
pre:
- mkdir -p ~/.local/bin
- curl -fsSL https://git.io/v2Ifs -o ~/.local/bin/circleci-matrix
- chmod +x ~/.local/bin/circleci-matrix
override:
- bash -e scripts/circle/install.sh
2 changes: 1 addition & 1 deletion lib/babel-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const plugins = (...items) => items.concat([
'transform-es2015-modules-commonjs'
]);

require('babel-register')({
require('babel-core/register')({
babelrc: false,
plugins: plugins(),
env: {
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions scripts/travis/install.sh → scripts/circle/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash -e
rm -rf node_modules
npm install
npm link

cd test/test-app
rm -rf node_modules
npm install
cd ../../
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import tryCatch from '../src/utils/try-catch';

import { getTestApp } from './utils/get-test-app';

const { env: { APPVEYOR, TRAVIS } } = process;
const { env: { APPVEYOR, CIRCLECI } } = process;

before(function (done) {
this.timeout(120000);
Expand All @@ -18,7 +18,7 @@ before(function (done) {
const path = resolvePath(__dirname, 'test-app');
const execOpts = { cwd: path };

if (!APPVEYOR && !TRAVIS) {
if (!APPVEYOR && !CIRCLECI) {
await exec('lux db:reset', execOpts);
}

Expand Down

0 comments on commit 856aeae

Please sign in to comment.