Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonstreator committed Dec 17, 2023
1 parent 77c9b1d commit 71a1cd1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Running Code Coverage

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Install dependencies
run: yarn install

- name: Run the tests
run: yarn test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"prepublish": "yarn build",
"clean": "rimraf dist",
"nuke": "rimraf node_modules dist",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest --run --coverage"
},
"dependencies": {
"pg": "^8.11.3",
Expand Down

0 comments on commit 71a1cd1

Please sign in to comment.