Skip to content

Commit

Permalink
Use vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Mar 5, 2024
1 parent 1e62bb3 commit 4ab412b
Show file tree
Hide file tree
Showing 19 changed files with 835 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
29 changes: 13 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Install project dependencies
Expand All @@ -35,12 +34,11 @@ jobs:
needs: lint
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Install project dependencies
Expand All @@ -53,7 +51,7 @@ jobs:
run: yarn build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packages
path: ./packages
Expand All @@ -69,16 +67,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packages
path: ./packages
Expand All @@ -91,8 +88,9 @@ jobs:

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
if: always()
with:
file: coverage/lcov.info
file: coverage/clover.xml

release:
name: Release
Expand All @@ -102,16 +100,15 @@ jobs:
- test
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packages
path: ./packages
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Install project dependencies
Expand All @@ -33,12 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Install project dependencies
Expand All @@ -51,7 +49,7 @@ jobs:
run: yarn build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packages
path: ./packages
Expand All @@ -67,16 +65,15 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packages
path: ./packages
Expand All @@ -89,5 +86,6 @@ jobs:

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
if: always()
with:
file: coverage/lcov.info
file: coverage/clover.xml
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "yarn workspaces foreach --topological-dev --verbose run build",
"types": "rimraf --glob 'packages/*/{types,*.tsbuildinfo}' && tsc -b",
"lint": "prettier --check . && eslint 'packages/*/lib/**/*.js'",
"test": "rna test:node packages/*/test/**/*.spec.js --coverage",
"test": "vitest --coverage",
"new": "plop --plopfile internals/generators/plopfile.cjs module",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
Expand All @@ -28,17 +28,17 @@
"@chialab/prettier-config": "^1.2.2",
"@chialab/rna": "*",
"@chialab/rna-node-test-runner": "*",
"@types/chai": "^4.2.22",
"@vitest/coverage-v8": "^1.3.1",
"@yarnpkg/core": "^4.0.0-rc.6",
"chai": "^4.3.4",
"chai-string": "^1.5.0",
"eslint": "^8.0.0",
"jsonc-parser": "^3.0.0",
"plop": "^3.1.2",
"prettier": "^3.1.1",
"rimraf": "^5.0.1",
"typescript": "^5.0.0",
"vitepress": "^1.0.0-rc.36"
"vitepress": "^1.0.0-rc.36",
"vitest": "^1.3.1"
},
"workspaces": [
"packages/*"
Expand Down
Loading

0 comments on commit 4ab412b

Please sign in to comment.