Skip to content

Commit

Permalink
compile before actual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Jan 3, 2025
1 parent 3c2dbe6 commit 110e19b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,40 @@ jobs:
run: |
cd packages/components && yarn build
- name: Run linting
run: cd packages/client && yarn lint

- name: Upload filesystem as artifact
uses: actions/upload-artifact@v4.5.0
with:
name: client
path: .
include-hidden-files: true

lint-client:
name: Lint client
needs: prepare-client-tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
shards: [0, 1, 2, 3, 4, 5]

steps:
- name: Download filesystem artifact
uses: actions/download-artifact@v4.1.8
with:
name: client
path: .

- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Compile
run: cd packages/client && yarn test:compilation

- name: Run linting
run: cd packages/client && yarn lint

test-client:
name: Test client
needs: prepare-client-tests
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "NODE_OPTIONS=--max_old_space_size=8000 vite build",
"docker:build": "docker build ../../ -f ../../Dockerfile-register -t ocrvs-client",
"docker:run": "docker run -it --rm -p 5000:80 --name ocrvs-client ocrvs-client",
"test": "yarn test:compilation && NODE_OPTIONS=--max_old_space_size=8000 vitest run --coverage --silent --dangerouslyIgnoreUnhandledErrors",
"test": "NODE_OPTIONS=--max_old_space_size=8000 vitest run --coverage --silent --dangerouslyIgnoreUnhandledErrors",
"test:watch": "vitest",
"open:cov": "yarn test && opener coverage/index.html",
"lint": "yarn lint:css && yarn lint:ts",
Expand Down

0 comments on commit 110e19b

Please sign in to comment.