Skip to content

Commit

Permalink
Merge pull request #135 from robsontenorio/dev
Browse files Browse the repository at this point in the history
v1.7.0
  • Loading branch information
JoaoPedroAS51 authored Oct 31, 2020
2 parents 91f598e + e1afa2a commit 22edb37
Show file tree
Hide file tree
Showing 32 changed files with 12,196 additions and 866 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
build
coverage
138 changes: 138 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master, dev ]

pull_request:
branches: [ master, dev ]

jobs:
test:
name: Build & Test

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 12.x, 14.x ]
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install

- name: Lint
run: yarn lint

- name: Test
run: yarn test

publish:
name: Publish

needs: test

runs-on: ${{ matrix.os }}

if: github.event_name == 'push' && github.ref == 'refs/heads/master'

strategy:
matrix:
os: [ ubuntu-latest ]
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: node_modules
key: 12.x-${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install

- name: Test
run: yarn test

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
with:
directory: ./coverage

- name: Publish to NPM
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

docs:
name: Documentation

needs: test

runs-on: ${{ matrix.os }}

if: github.ref == 'refs/heads/master'

strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 12.x ]
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
id: cache-modules-docs
uses: actions/cache@v2
with:
path: ./docs/node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./docs
run: yarn install

- name: Generate
working-directory: ./docs
run: yarn generate

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/dist
Loading

0 comments on commit 22edb37

Please sign in to comment.