Started Adding Jest and Tests

This commit is contained in:
Ahmad 2024-12-28 17:36:50 -05:00
parent 542405be98
commit 64c366998e
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 3047 additions and 59 deletions

View file

@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: 'latest'
- name: Configure Corepack
run: corepack enable

34
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Run tests and upload coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Configure Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}