-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add node module caching to web_ci_workflow, start unit_ci_workflow
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters