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: fix build and speed up ci #119

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- main
jobs:
ci:
name: CI
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -21,10 +21,10 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Install Dependencies
run: yarn bootstrap
run: yarn --network-timeout 100000

- name: Install Playwright Browsers
run: yarn playwright install --with-deps
Expand All @@ -37,5 +37,23 @@ jobs:
- name: Codecov
uses: codecov/codecov-action@v4

build-lint:
name: Build and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Install Dependencies
run: yarn --network-timeout 100000

- name: Lint
run: yarn lint

- name: Build Project
run: yarn build
49 changes: 23 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@
"scripts": {
"bootstrap": "yarn --network-timeout 100000 && yarn --cwd www --network-timeout 100000",
"build": "rimraf lib && yarn build:esm && yarn build:cjs && yarn build:popper",
"build:esm": "babel src --out-dir lib --delete-dir-on-start --extensions '.ts,.tsx' --ignore='**/*.d.ts' && yarn build:esm:types",
"build:cjs": "babel src --out-dir cjs --env-name cjs --delete-dir-on-start --extensions '.ts,.tsx' --ignore='**/*.d.ts' && yarn build:cjs:types && echo '{\"type\": \"commonjs\"}' > cjs/package.json",
"build:esm": "babel src --out-dir lib --delete-dir-on-start --extensions .ts,.tsx --ignore '**/*.d.ts' && yarn build:esm:types",
"build:cjs": "babel src --out-dir cjs --env-name cjs --delete-dir-on-start --extensions .ts,.tsx --ignore '**/*.d.ts' && yarn build:cjs:types && echo '{\"type\": \"commonjs\"}' > cjs/package.json",
"build:esm:types": "tsc -p . --emitDeclarationOnly --declaration --outDir lib",
"build:cjs:types": "tsc -p . --emitDeclarationOnly --declaration --outDir cjs",
"build:pick": "cherry-pick --cwd=lib --input-dir=../src --cjs-dir=cjs --esm-dir=esm",
"build:popper": "rollup src/popper.ts --file cjs/popper.js --format cjs --name popper --plugin @rollup/plugin-node-resolve && rollup src/popper.ts --file lib/popper.js --format esm --name popper --plugin @rollup/plugin-node-resolve",
"deploy-docs": "yarn --cwd www deploy",
"lint": "eslint src test",
Expand All @@ -97,8 +96,7 @@
"conventionalCommits": true
},
"dependencies": {
"@babel/eslint-parser": "^7.25.9",
"@babel/runtime": "^7.26.0",
"@babel/runtime": "^7.26.7",
"@popperjs/core": "^2.11.8",
"@restart/hooks": "^0.6.2",
"@types/warning": "^3.0.3",
Expand All @@ -116,46 +114,45 @@
"@4c/rollout": "^4.0.2",
"@4c/tsconfig": "^0.4.1",
"@babel/cli": "^7.26.4",
"@babel/core": "^7.26.0",
"@babel/core": "^7.26.7",
"@babel/eslint-parser": "^7.26.5",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@eslint/js": "^9.17.0",
"@eslint/js": "^9.20.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@types/classnames": "^2.3.4",
"@types/react": "^19.0.4",
"@types/react-dom": "^19.0.2",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@types/react-transition-group": "^4.4.12",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/browser": "^2.1.8",
"@vitest/coverage-istanbul": "2.1.8",
"@vitest/browser": "^3.0.5",
"@vitest/coverage-istanbul": "3.0.5",
"babel-eslint": "^10.1.0",
"babel-preset-env-modules": "^1.0.1",
"cross-env": "^7.0.3",
"eslint": "^9.17.0",
"eslint-config-4catalyzer-typescript": "^3.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint": "^9.20.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"gh-pages": "^3.1.0",
"globals": "^15.14.0",
"hookem": "^3.0.4",
"lint-staged": "^15.3.0",
"playwright": "^1.49.1",
"lint-staged": "^15.4.3",
"playwright": "^1.50.1",
"prettier": "^3.4.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-transition-group": "^4.4.5",
"rimraf": "^6.0.1",
"rollup": "^4.30.1",
"rollup": "^4.34.6",
"typescript": "^5.7.3",
"typescript-eslint": "^8.19.1",
"vitest": "^2.1.8"
"typescript-eslint": "^8.23.0",
"vitest": "^3.0.5"
},
"bugs": {
"url": "https://github.com/react-restart/ui/issues"
Expand Down
Loading