Skip to content

Commit

Permalink
feat: 集成 github action
Browse files Browse the repository at this point in the history
  • Loading branch information
taixw2 committed Apr 20, 2020
1 parent 2cfaeae commit 6da346c
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 4 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"plugins": [
["@babel/plugin-transform-runtime"],
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
],
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
build:
runs-on: ubuntu-latest

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

- name: Run Test
uses: borales/[email protected]
with:
cmd: install
uses: borales/[email protected]
with:
cmd: test

- name: Upload coverage
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ docs
lib/

*-lock.json
*.lock
*.lock

coverage/
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# dxjs [![NPM Version](https://img.shields.io/npm/v/@dxjs/core?style=flat)](https://npmjs.com/package/@dxjs/core)
# dxjs

<p style="text-align:center">
[![Codecov Coverage](https://img.shields.io/codecov/c/github/taixw2/dx/master.svg?style=flat-square)](https://codecov.io/gh/taixw2/dx/)
[![NPM Version](https://img.shields.io/npm/v/@dxjs/core?style=flat)](https://npmjs.com/package/@dxjs/core)
</p>

基于 Redux、Redux-saga、Typescripe 的库,用来组织应用中的副作用和管理状态

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"babel-eslint": "^10.1.0",
"babel-jest": "^25.3.0",
"chalk": "^4.0.0",
"codecov": "^3.6.5",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.10.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/__tests__/example-model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* istanbul ignore file */

import { DxModel } from '../src';
import { DxModelInterface, DxModelContstructor } from '@dxjs/shared/interfaces/dx-model.interface';
import { Reducer, Effect } from '../../common/src';
Expand Down
4 changes: 2 additions & 2 deletions scripts/jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module.exports = {
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
collectCoverage: true,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
// collectCoverageFrom: [],

// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
Expand Down

0 comments on commit 6da346c

Please sign in to comment.