Skip to content

Commit

Permalink
Merge pull request #171 from chialab/vitest
Browse files Browse the repository at this point in the history
Use vitest
  • Loading branch information
edoardocavazza authored Mar 5, 2024
2 parents 1e62bb3 + 78aa0e6 commit 6f5fefd
Show file tree
Hide file tree
Showing 21 changed files with 1,051 additions and 547 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"**/types/*",
"**/fixture/*",
"**/fixtures/*",
"**/test/out/*",
"public",
"docs/.vitepress/dist",
"docs/.vitepress/cache"
Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @param {import('plop').NodePlopAPI} plop
*/
module.exports = function (plop) {
export default (plop) => {
plop.setGenerator('module', {
description: 'RNA ecosystem module.',
prompts: [
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"clear": "rimraf --glob 'packages/*/{types,*.tsbuildinfo}' 'packages/*/dist'",
"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",
"lint": "prettier --check . && eslint .",
"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",
"plop": "^4.0.0",
"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 6f5fefd

Please sign in to comment.