Skip to content
Permalink
Browse files

Update nodejs.yml

  • Loading branch information...
marcomontalbano committed Aug 28, 2019
1 parent abdfa3a commit c05ee74be96ffe7db4cebaa21ae98936f1501c22
Showing with 74 additions and 20 deletions.
  1. +69 −15 .github/workflows/nodejs.yml
  2. +5 −5 .travis.yml
@@ -3,41 +3,95 @@ name: Node CI
on: [push]

jobs:
build:

test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Project setup `npm install && npm run build`
run: |
npm install
npm run build --if-present
env:
CI: true
node-version: ${{ matrix.node }}
- name: Project setup `npm install`
run: npm install
- name: Run `test`
run: npm test



coverage:
needs: [test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Project setup `npm install`
run: npm install

- name: Run `coverage`
run: npm run coverage
- name: Export `coverage`
env:
NODE_COVERALLS_DEBUG: 0
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_GIT_COMMIT: ${{ github.sha }}
COVERALLS_GIT_BRANCH: ${{ github.ref }}
run: |
npm install coveralls
cat coverage/lcov.info | ./node_modules/.bin/coveralls
- name: Upload `coverage` artifact
uses: actions/upload-artifact@v1
with:
name: coverage
path: coverage/lcov-report



stryker:
needs: [test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Project setup `npm install`
run: npm install

- name: Run `stryker`
run: npm run stryker
run: |
npm install
npm run stryker
- name: Upload `stryker` artifact
uses: actions/upload-artifact@v1
with:
name: stryker
path: reports/mutation/html


publish:
needs: [test, coverage]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
if: github.ref == 'refs/heads/master'
- uses: actions/setup-node@v1
if: github.ref == 'refs/heads/master'
with:
node-version: 10.x
- name: Project setup `npm install && npm run build`
if: github.ref == 'refs/heads/master'
run: |
npm install
npm run build --if-present
env:
CI: true
- name: Run `publish`
if: github.ref == 'refs/heads/master'
run: npm run publish --if-present
@@ -1,8 +1,8 @@
language: node_js
node_js:
- "10"
after_success:
- npm install coveralls codeclimate-test-reporter
- npm run coverage
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls || true
- cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate-test-reporter || true
# after_success:
# - npm install coveralls codeclimate-test-reporter
# - npm run coverage
# - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls || true
# - cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate-test-reporter || true

0 comments on commit c05ee74

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