Skip to content

Commit bcb1f52

Browse files
authored
Merge pull request #11 from luminosityleds/LL-351
LL-351: Setup testing framework for browser repo
2 parents 0fc6de3 + 9335a93 commit bcb1f52

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run tests and upload coverage
2+
3+
on:
4+
push
5+
6+
jobs:
7+
test:
8+
name: Run tests and collect coverage
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 2
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v4
18+
19+
- name: Install dependencies
20+
run: npm install
21+
22+
- name: Run tests
23+
run: npx jest --coverage --reporters=jest-junit
24+
25+
- name: Upload results to Codecov
26+
uses: codecov/codecov-action@v5
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
slug: luminosityleds/browser
30+
31+
- name: Upload test results to Codecov
32+
if: ${{ !cancelled() }}
33+
uses: codecov/test-results-action@v1
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Browser
2+
[![codecov](https://codecov.io/gh/luminosityleds/browser/graph/badge.svg?token=nbq2Y8WP3U)](https://codecov.io/gh/luminosityleds/browser)
3+
14
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
25

36
## Getting Started

package-lock.json

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"eslint": "^9",
3636
"eslint-config-next": "15.1.2",
3737
"jest": "^30.1.3",
38+
"jest-junit": "^16.0.0",
3839
"postcss": "^8",
3940
"tailwindcss": "^3.4.1",
4041
"ts-jest": "^29.4.1",

0 commit comments

Comments
 (0)