-
Notifications
You must be signed in to change notification settings - Fork 491
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 #311 from aquariuslt/master
ci: add github workflows for test/build/publish
- Loading branch information
Showing
6 changed files
with
87 additions
and
3 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,22 @@ | ||
name: build | ||
|
||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
|
||
steps: | ||
- name: SCM | ||
uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: NODE CI | ||
run: | | ||
npm install | ||
npm test |
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,42 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SCM | ||
uses: actions/checkout@v1 | ||
- name: Setup Node Environment | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
- name: Node CI | ||
run: | | ||
npm install | ||
npm test | ||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SCM | ||
uses: actions/checkout@v1 | ||
- name: Setup Node Environment | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Yarn install & Build | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Publish to NPM Registry | ||
run: npm publish | ||
if: github.event.action == 'created' | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} |
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
language: node_js | ||
node_js: | ||
- "8" | ||
- "10" | ||
- "12" | ||
env: | ||
- REACT=16.x | ||
script: | ||
- npm test | ||
- npm run coverage | ||
before_install: | ||
- npm install | ||
- npm install react react-dom | ||
after_script: | ||
npm install coveralls && nyc report --reporter=text-lcov | coveralls |
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
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
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