Skip to content

Commit

Permalink
chore(travis): setup travis CI (#58)
Browse files Browse the repository at this point in the history
* chore(travis): setup travis CI

* chore(travis): dismiss yarn for now

Until yarnpkg/yarn#1538 is solved

* chore(travis): make sure to run all a11y tests
  • Loading branch information
yhuard authored Feb 8, 2017
1 parent 5c9d1d7 commit 289f9d3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 12 deletions.
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
language: node_js
node_js:
- "6"
env:
global:
- CXX=g++-4.8
matrix:
- TEST_SUITE=lint
- TEST_SUITE=test:a11y

sudo: required
dist: trusty

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- google-chrome
packages:
- gcc-4.8
- g++-4.8
- google-chrome-stable
artifacts:
paths:
- $TRAVIS_BUILD_DIR/screenshots.zip
- $TRAVIS_BUILD_DIR/gemini-report/
- $TRAVIS_BUILD_DIR/selenium.txt
cache:
apt: true
yarn: false
directories:
- node_modules

before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0

install:
- npm install
- npm run dist

before_script:
- npm install -g gemini
- npm install -g selenium-standalone
- selenium-standalone install
- xvfb-run --server-args="-screen 0, 1600x2400x24" selenium-standalone start > selenium.txt &
- sleep 5

script:
- npm run $TEST_SUITE # run unit test, css regression, and css reference in parallel
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# WIP
# EC Component Library

Component library based on [Fractal](http://fractal.build/) using lerna and other fancy tools.
[![Build Status](https://travis-ci.org/ec-europa/europa-component-library.svg?branch=master)](https://travis-ci.org/ec-europa/europa-component-library)

Component library based on [Fractal](http://fractal.build/).

Requirements:
- Node.js >= 6
- lerna 2.0.0-beta.34
- yarn

## Setup

```
yarn
npm run bootstrap
yarn bootstrap
```

## Develop
Expand All @@ -31,37 +32,37 @@ selenium-standalone install

Then, in 3 separate consoles:

- Start the server:
- Start the server:

```
yarn start
```

- Start selenium:
- Start selenium:

```
selenium-standalone start
```

- Run the tests:
- Run the tests:

```
npm run gemini:test
yarn gemini:test
```

If you want to update the reference screeshots:

```
npm run gemini:update
yarn gemini:update
```

## Test (accessibility)

Build the project and run accessibility testing:

```
npm run dist
npm run test:a11y
yarn dist
yarn test:a11y
```

## Deploy to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"precommit": "lint-staged",
"serve": "fractal start --sync",
"start": "npm-run-all clean build --parallel serve watch",
"test:a11y": "a11y ./dist/components/preview/**/*.html",
"test:a11y": "a11y ./dist/components/preview/**",
"watch:scripts": "chokidar './framework/**/*.js' -c 'eslint {path} && npm run build:scripts'",
"watch:styles": "chokidar './framework/**/*.scss' -c 'stylelint {path} && npm run build:styles'",
"watch": "npm-run-all --parallel watch:*"
Expand Down

0 comments on commit 289f9d3

Please sign in to comment.