Skip to content

Commit

Permalink
Adds code coverage workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlange committed Jul 3, 2021
1 parent 3b9a2d7 commit 83a03f6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: ['push', 'pull_request']

name: Code Coverage

jobs:
test:
name: Test
runs-on: ubuntu-latest

strategy:
fail-fast: true

steps:
- uses: actions/checkout@v1

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install
run: |
npm install
npm run build
- name: Lint & Test
run: |
npm run lint
npm run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@
"types/**/*"
],
"scripts": {
"test": "jest --coverage",
"start": "tsc --watch",
"build": "npx tsc && npx tsc --project tsconfig.prod.json",
"precommit": "npm-run-all dev:types dev:test dev:lint dev:pretty",
"dev:types": "tsc --noEmit",
"dev:test": "jest --coverage",
"dev:lint": "eslint 'src/**/*.{js,ts}' --fix ",
"dev:pretty": "prettier 'src/**/*.{js,ts}' --write",
"bench": "npm-run-all build bench:working bench:compare",
"lint": "eslint 'src/**/*.{js,ts}' --fix ",
"pretty": "prettier 'src/**/*.{js,ts}' --write",
"precommit": "npm-run-all build test lint pretty",
"bench:working": "node benchmarks > \"coverage/working\"",
"bench:master": "node benchmarks > \"coverage/master\"",
"bench:compare": "nanobench-compare \"coverage/working\" \"coverage/master\"",
Expand Down
1 change: 0 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import type {
ComponentClass,
ContextClass,
Entity,
EntityClass,
SystemClass
} from './ecs';
Expand Down

0 comments on commit 83a03f6

Please sign in to comment.