Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mo4islona committed Apr 26, 2024
1 parent 03ac7d1 commit 411fa70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache
env:
cache-name: rest-api
- name: Install node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-yarn-
node-version: 18

- name: Install Yarn
run: corepack enable

# Yarn dependencies cannot be cached until yarn is installed
# WORKAROUND: https://github.com/actions/setup-node/issues/531
- name: Extract cached dependencies
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"sqd": "./bin/run.js",
"bl": "node ./lib/blessed.js",
"lint": "eslint --fix src/**/*",
"test:unit": "NODE_ENV=test jest --bail --testRegex=.unit.spec.ts$",
"test:unit": "NODE_ENV=test jest --bail --testRegex=.unit.spec.ts\\$",
"tsc": "tsc --noEmit",
"pkg:build": "./bin/pkg-build.sh",
"pkg:compress": "./bin/pkg-compress.sh",
Expand Down

0 comments on commit 411fa70

Please sign in to comment.