Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GitHub Actions w/ codecov reports #681

Merged
merged 8 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- main
- next
pull_request:

jobs:
lint:
name: Quality checks

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install dependencies
run: npm ci

- name: Security audit
run: npm audit

- name: Code coverage
run: npx nyc --reporter=lcovonly npm test

- uses: codecov/codecov-action@v1
with:
files: ./coverage/lcov.info
fail_ci_if_error: true

- name: Lint
run: npx eslint .

- name: Check formatting
run: npx prettier . --check

test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [10.x, 12.x, 14.x]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Set up Git
if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf input

- uses: actions/checkout@v2

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

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ pids
*.seed

# Coverage directory used by tools like istanbul
.nyc_output/
coverage/

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
# Dependencies
node_modules/

# Users Environment Variables
.lock-wscript
# IDEs
.idea
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Coverage directory used by tools like istanbul
.nyc_output/
coverage/

# Dependencies
node_modules/
package-lock.json

# JSON configuration files
.eslintrc

# IDEs
.idea/
.vscode/
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

Loading