Skip to content

Commit

Permalink
Cache to check test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 18, 2024
1 parent f326abd commit e44c8a1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/extension-PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,28 @@ jobs:
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
holo-key-manager-extension/build
holo-key-manager-js-client/lib
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-
- name: Run unit tests
run: pnpm test
working-directory: holo-key-manager-extension

- name: Build extension
if: steps.cache-build.outputs.cache-hit != 'true'
run: pnpm build
working-directory: holo-key-manager-extension

- name: Build and pack client
if: steps.cache-build.outputs.cache-hit != 'true'
run: pnpm build
working-directory: holo-key-manager-js-client

Expand Down
8 changes: 6 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import path from 'path';
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['tests/**/*.test.ts']
include: ['tests/**/*.test.ts'],
poolOptions: {
threads: {
singleThread: true
}
}
},
resolve: {
alias: {
Expand Down

0 comments on commit e44c8a1

Please sign in to comment.