-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update devDeps - Run lint after tests, not before - Push to github before publishing, not after - Use GitHub Actions for CI instead of appveyor/travis - Remove outdated CoC, PR template, etc. PR-URL: #11 Credit: @claudiahdz Close: #11 Reviewed-by: @isaacs
- Loading branch information
Showing
11 changed files
with
1,362 additions
and
1,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
_extends: 'open-source-project-boilerplate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
################################################################################ | ||
# Template - Node CI | ||
# | ||
# Description: | ||
# This contains the basic information to: install dependencies, run tests, | ||
# get coverage, and run linting on a nodejs project. This template will run | ||
# over the MxN matrix of all operating systems, and all current LTS versions | ||
# of NodeJS. | ||
# | ||
# Dependencies: | ||
# This template assumes that your project is using the `tap` module for | ||
# testing. If you're not using this module, then the step that runs your | ||
# coverage will need to be adjusted. | ||
# | ||
################################################################################ | ||
name: Node CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [10.x, 12.x, 13.x] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v2 | ||
# Installs the specific version of Node.js | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
################################################################################ | ||
# Install Dependencies | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has a package-lock.json file | ||
# | ||
# Simply run the tests for the project. | ||
################################################################################ | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
################################################################################ | ||
# Run Testing | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has `tap` as a devDependency | ||
# - There is a script called "test" in the package.json | ||
# | ||
# Simply run the tests for the project. | ||
################################################################################ | ||
- name: Run tests | ||
run: npm test | ||
|
||
################################################################################ | ||
# Run coverage check | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has `tap` as a devDependency | ||
# - There is a script called "coverage" in the package.json | ||
# | ||
# Coverage should only be posted once, we are choosing the latest LTS of | ||
# node, and ubuntu as the matrix point to post coverage from. We limit | ||
# to the 'push' event so that coverage ins't posted twice from the | ||
# pull-request event, and push event (line 3). | ||
################################################################################ | ||
- name: Run coverage report | ||
if: github.event_name == 'push' && matrix.node-version == '12.x' && matrix.os == 'ubuntu-latest' | ||
run: npm run coverage | ||
env: | ||
# The environment variable name is leveraged by `tap` | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
################################################################################ | ||
# Run linting | ||
# | ||
# ASSUMPTIONS: | ||
# - There is a script called "lint" in the package.json | ||
# | ||
# We run linting AFTER we run testing and coverage checks, because if a step | ||
# fails in an GitHub Action, all other steps are not run. We don't want to | ||
# fail to run tests or coverage because of linting. It should be the lowest | ||
# priority of all the steps. | ||
################################################################################ | ||
- name: Run linter | ||
run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/node_modules | ||
/.nyc_output | ||
/test/cache | ||
/coverage |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.