Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
- Enable GitHub Actions
- Update dependencies
  • Loading branch information
ndaidong committed Nov 9, 2020
1 parent f13b601 commit 5529926
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 16 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# GitHub actions
# https://docs.github.com/en/free-pro-team@latest/actions

name: ci-test

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-20.04

strategy:
matrix:
node_version: [10.14.2, 14.x, 15.x]

steps:
- uses: actions/checkout@v2

- name: setup Node.js v${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}

- name: run npm scripts
run: |
npm install
npm run lint
npm run build --if-present
npm run citest
- name: sync to coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ coverage
yarn.lock
coverage.lcov
package-lock.json
pnpm-lock.yaml
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Calculate average and scoring based on Wilson Score Equation

[![NPM](https://badge.fury.io/js/average-rating.svg)](https://badge.fury.io/js/average-rating)
[![Build Status](https://travis-ci.org/ndaidong/average-rating.svg?branch=master)](https://travis-ci.org/ndaidong/average-rating)
[![Coverage Status](https://coveralls.io/repos/github/ndaidong/average-rating/badge.svg?branch=master)](https://coveralls.io/github/ndaidong/average-rating?branch=master)
![CI test](https://github.com/ndaidong/average-rating/workflows/ci-test/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/ndaidong/average-rating/badge.svg)](https://coveralls.io/github/ndaidong/average-rating)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ndaidong_average-rating&metric=alert_status)](https://sonarcloud.io/dashboard?id=ndaidong_average-rating)

![Google app on Google Play](https://i.imgur.com/XKEEpdb.png)

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.2.1",
"name": "average-rating",
"description": "Calculate average score and rating based on Wilson Score Equation",
"homepage": "https://www.npmjs.com/package/average-rating",
Expand All @@ -10,18 +10,18 @@
"author": "@ndaidong",
"main": "./index.js",
"engines": {
"node": ">= 8.6"
"node": ">= 10.14.2"
},
"scripts": {
"lint": "eslint src test/specs",
"lint": "eslint src tests/specs",
"pretest": "npm run lint",
"test": "tap test/start.js --coverage --reporter=spec",
"test": "tap tests/start.js --coverage --reporter=spec --coverage-report=html --no-browser",
"citest": "tap tests/start.js --coverage --reporter=spec --coverage-report=lcov --no-browser",
"reset": "node reset"
},
"devDependencies": {
"coveralls": "^3.0.9",
"eslint-config-goes": "^1.1.8",
"tap": "^14.10.2"
"tap": "^14.10.8"
},
"keywords": [
"rating",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/start.js → tests/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {

const dirs = ['average', 'rate', 'score'];
dirs.forEach((dir) => {
const where = './test/specs/' + dir;
const where = './tests/specs/' + dir;
if (existsSync(where)) {
readdirSync(where).forEach((file) => {
if (extname(file) === '.js') {
Expand Down

0 comments on commit 5529926

Please sign in to comment.