Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor unit tests #919

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
44 changes: 0 additions & 44 deletions .github/workflows/ci-main.yml

This file was deleted.

21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Continuous Integration
on:
pull_request:
types: [opened, synchronize]
push:
branches: [main]
tags: [v*]

permissions: read-all

jobs:
Expand All @@ -10,21 +15,29 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup
uses: ./.github/actions/setup

- run: npm run version:check

- name: Size check
run: npm run size-limit

- name: Lint code
run: npm run lint

- name: Lint docs
run: npm run lint:markdown

- name: Transpile code
run: npm run compile
- name: Unit test
run: npm run test:unit:ci
- name: Unit test (nodejs)
run: npm run test:unit:ci-node

- name: Install playwright
uses: ./.github/actions/install-playwright

- name: Unit tests
run: npm run test:unit

playwright:
uses: ./.github/workflows/tests.yml
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ tests_output/

# contains secrets
.env

vitest-report
__screenshots__
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
git-tag-version = false
registry=https://registry.npmjs.org/
15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,19 @@ export default [
},
},
},
{
files: ['**/*.test.ts'],
languageOptions: {
globals: {
...globals.browser,
},
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2020,
project: 'tsconfig.eslint.json',
},
},
},
{
ignores: [
'**/dist/',
Expand All @@ -240,6 +253,8 @@ export default [
'.vscode/',
'examples/installing-npm',
'examples/next-ssr-example',
'vitest-report',
'packages/web/test',
],
},
]
Loading
Loading