Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add github workflows for test/build/publish #311

Merged
merged 4 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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