diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a525bf9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm ci, lint, test and build + run: | + npm ci + npm run lint + npm test -- praparat --no-watch --no-progress --browsers=ChromeHeadlessCI + npm run build -- praparat + npm run build -- demo-app --prod + env: + CI: true diff --git a/README.md b/README.md index 44acf7e..fb66415 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +![Build Status](https://github.com/itigoore01/praparat/workflows/CI/badge.svg) +[![npm version](https://badge.fury.io/js/praparat.svg)](https://badge.fury.io/js/praparat) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + + # Praparat This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.5. diff --git a/projects/praparat/karma.conf.js b/projects/praparat/karma.conf.js index 8968d11..b74a0bf 100644 --- a/projects/praparat/karma.conf.js +++ b/projects/praparat/karma.conf.js @@ -26,6 +26,12 @@ module.exports = function (config) { logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], + customLaunchers: { + ChromeHeadlessCI: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + } + }, singleRun: false, restartOnFileChange: true });