Skip to content

Commit

Permalink
ci: setup github workflows (i18next#218)
Browse files Browse the repository at this point in the history
* ci: setup github workflows

* chore: rename prepublish to prepublishOnly

* fix(exlint): fix unexpected identation

* ci: upload coverage to CodeCov

* chore: remove --no-esm argument and disable coverage check while running tap test

* chore: update coverage generation script

Co-authored-by: Cheton Wu <[email protected]>
  • Loading branch information
cheton and Cheton Wu authored Oct 12, 2021
1 parent cd234e6 commit 5ec19d8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 1,27 @@
name: Node.js CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn eslint
- run: yarn build
- run: yarn test
- run: yarn coverage
- uses: codecov/codecov-action@v2
with:
name: node-${{ matrix.node-version }}
fail_ci_if_error: false
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 16,11 @@
},
"main": "lib/index.js",
"scripts": {
"prepublish": "npm run eslint && npm run build && npm test",
"prepublishOnly": "npm run eslint && npm run build && npm test",
"build": "babel ./src --out-dir ./lib",
"eslint": "eslint ./src",
"coveralls": "tap test/*.js --coverage --coverage-report=text-lcov --nyc-arg=--require --nyc-arg=babel-register | coveralls",
"test": "tap test/*.js --no-esm --no-timeout --node-arg=--require --node-arg=@babel/register --node-arg=--require --node-arg=core-js/stable --node-arg=--require --node-arg=regenerator-runtime/runtime"
"coverage": "nyc --reporter=lcov --reporter=text yarn test",
"test": "tap test/*.js --no-timeout --node-arg=--require --node-arg=@babel/register --node-arg=--require --node-arg=core-js/stable --node-arg=--require --node-arg=regenerator-runtime/runtime"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -75,8 75,8 @@
"@babel/register": "~7.12.1",
"@trendmicro/babel-config": "~1.0.0-alpha",
"babel-eslint": "~10.1.0",
"codecov": "^3.8.3",
"core-js": "^3.7.0",
"coveralls": "^3.1.0",
"eslint": "^7.13.0",
"eslint-config-trendmicro": "^1.4.1",
"eslint-plugin-import": "^2.22.1",
Expand All @@ -86,7 86,10 @@
"gulp-tap": "^2.0.0",
"gulp-util": "^3.0.8",
"sha1": "^1.1.1",
"tap": "^14.10.8",
"tap": "^15.0.10",
"text-table": "^0.2.0"
},
"tap": {
"check-coverage": false
}
}
2 changes: 1 addition & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 19,7 @@ import omitEmptyObject from './omit-empty-object';
import nodesToString from './nodes-to-string';

i18next.init({
compatibilityJSON: 'v3',
compatibilityJSON: 'v3',
});

const defaults = {
Expand Down

0 comments on commit 5ec19d8

Please sign in to comment.