Skip to content

Commit

Permalink
Merge pull request #311 from aquariuslt/master
Browse files Browse the repository at this point in the history
ci: add github workflows for test/build/publish
  • Loading branch information
z2014 authored Sep 5, 2019
2 parents f3c9d6d + 56fecbd commit c74a370
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
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
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
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}}
3 changes: 1 addition & 2 deletions .travis.yml
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React-WeUI [![Build Status](https://travis-ci.org/weui/react-weui.svg?branch=master)](https://travis-ci.org/weui/react-weui) [![npm version](https://img.shields.io/npm/v/react-weui.svg)](https://www.npmjs.org/package/react-weui)
# React-WeUI [![Build Status](https://travis-ci.org/weui/react-weui.svg?branch=master)](https://travis-ci.org/weui/react-weui) [![Github Workflow Status](https://github.com/weui/react-weui/workflows/ci/badge.svg)](https://github.com/weui/react-weui) [![npm version](https://img.shields.io/npm/v/react-weui.svg)](https://www.npmjs.org/package/react-weui)

[WeUI](https://github.com/weui/weui) Components build with [React](http://facebook.github.io/react/).

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
"open-browser-webpack-plugin": "0.0.1",
"postcss-loader": "^2.0.6",
"raw-loader": "^0.5.1",
"react": "^16.9.0",
"react-codemirror": "^0.2.6",
"react-docgen": "^3.0.0",
"react-dom": "^16.9.0",
"react-fontawesome": "^1.3.1",
"react-remarkable": "^1.1.1",
"react-router": "^4.1.1",
Expand Down
19 changes: 19 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6559,6 +6559,16 @@ react-docgen@^3.0.0:
node-dir "^0.1.10"
recast "^0.16.0"

react-dom@^16.9.0:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.9.0.tgz#5e65527a5e26f22ae3701131bcccaee9fb0d3962"
integrity sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.15.0"

react-fontawesome@^1.3.1:
version "1.6.1"
resolved "https://registry.npmjs.org/react-fontawesome/-/react-fontawesome-1.6.1.tgz#eddce17e7dc731aa09fd4a186688a61793a16c5c"
Expand Down Expand Up @@ -6649,6 +6659,15 @@ react-transition-group@^2.0.2:
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react@^16.9.0:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa"
integrity sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"

read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
Expand Down

0 comments on commit c74a370

Please sign in to comment.