Skip to content

Commit

Permalink
Setup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rodion-arr committed Dec 17, 2020
1 parent 146d1ae commit 08ea6a8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Node.js CI

on:
schedule:
- cron: '23 4 * * *' # Once, nightly
push:
branches:
- main
pull_request:

jobs:

test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 15, 14, 12, 10 ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run tests-only

lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 14 ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NPM Version](https://img.shields.io/npm/v/create-pkg.svg)](https://npmjs.org/package/create-pkg)
[![NPM Downloads](https://img.shields.io/npm/dm/create-pkg.svg)](https://npmjs.org/package/create-pkg)
[![test](https://github.com/pkgjs/create/workflows/Test/badge.svg)](https://github.com/pkgjs/create/actions?query=workflow%3ATest)
[![test](https://github.com/pkgjs/create/workflows/Node.js%20CI/badge.svg)](https://github.com/pkgjs/create/actions?query=workflow%3A%22Node.js+CI%22)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)

## Usage
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"create-package": "bin/create-package"
},
"scripts": {
"test": "standard && mocha --timeout=60000",
"lint": "standard",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "mocha --timeout=60000",
"test:debug": "mocha --inspect --inspect-brk --timeout=0",
"release": "npm t && standard-version && npm publish",
"postpublish": "git push origin && git push origin --tags"
Expand Down

0 comments on commit 08ea6a8

Please sign in to comment.