-
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from robsontenorio/dev
v1.7.0
- Loading branch information
Showing
32 changed files
with
12,196 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
build | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.