Skip to content

Commit

Permalink
chore: setup unit test CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddaytw committed Dec 8, 2024
1 parent b47c0d8 commit 3a8a9b2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Jest unit testing

on: push

jobs:
test:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn
- run: yarn test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"example": "yarn workspace react-native-transformers-example",
"test": "jest",
"test": "jest --coverage",
"lint": "eslint . --fix",
"prepare": "bob build",
"release": "release-it",
Expand Down

0 comments on commit 3a8a9b2

Please sign in to comment.