Skip to content

Merge pull request #84 from dallen4/feat/optimizations-and-cleanup #9

Merge pull request #84 from dallen4/feat/optimizations-and-cleanup

Merge pull request #84 from dallen4/feat/optimizations-and-cleanup #9

name: Unit Tests
on:
pull_request:
push:
branches: [main, alpha]
jobs:
test:
runs-on: macos-latest
permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/cache@v4
id: cache-node-modules
with:
path: |
./node_modules
./web/node_modules
./cli/node_modules
./worker/node_modules
./shared/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Run Unit Tests
run: CI="true" yarn test:cov
# - name: Report Coverage
# if: github.event_name == 'pull_request'
# uses: davelosert/vitest-coverage-report-action@v2