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

update e2e dependencies resource #1155

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ jobs:
node_modules
test/e2e/miniprogram-project/node_modules
test/e2e/plugin-project/node_modules
packages/webpack-plugin/node_modules
packages/core/node_modules
packages/api-proxy/node_modules
test/e2e/miniprogram-wxss-loader/node_modules

key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand All @@ -36,16 +35,19 @@ jobs:

- name: install deps
if: steps.cache.outputs.cache-hit != 'true'
run: npm i && npm i --prefix test/e2e/miniprogram-project && npm i --prefix test/e2e/plugin-project && npx lerna bootstrap --no-ci
run: npm i && npm i --prefix test/e2e/miniprogram-project && npm i --prefix test/e2e/plugin-project && npm i --prefix test/e2e/miniprogram-wxss-loader && npx lerna bootstrap --no-ci

- name: copy-webpack-plugin
run: npm run copyPlugin --prefix test/e2e/miniprogram-project && npm run copyPlugin --prefix test/e2e/plugin-project
run: npm run copyPlugin --prefix test/e2e/miniprogram-project && npm run copyPlugin --prefix test/e2e/plugin-project && npm run copyPlugin --prefix test/e2e/miniprogram-wxss-loader

- name: build-miniprogram
run: npm run build:cross --prefix test/e2e/miniprogram-project

- name: build-plugin
run: npm run build --prefix test/e2e/plugin-project

- name: build-wxss-loader
run: npm run build --prefix test/e2e/miniprogram-wxss-loader

- name: exec unit test
run: npm t && npm t --prefix test/e2e/miniprogram-project && npm t --prefix test/e2e/plugin-project
run: npm t && npm t --prefix test/e2e/miniprogram-project && npm t --prefix test/e2e/plugin-project && npm t --prefix test/e2e/miniprogram-wxss-loader
14 changes: 14 additions & 0 deletions test/e2e/copyWebpackPlugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
echo "start copy webpackPlugin"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写个逻辑吧packages下面的所有包都copy了吧


rm -rf ./node_modules/@mpxjs/webpack-plugin/lib ./node_modules/@mpxjs/utils/src ./node_modules/@mpxjs/store/src ./node_modules/@mpxjs/pinia/src ./node_modules/@mpxjs/core/src ./node_modules/@mpxjs/fetch/src ./node_modules/@mpxjs/api-proxy/src


cp -r ../../../packages/webpack-plugin/lib/ ./node_modules/@mpxjs/webpack-plugin/lib/
cp -r ../../../packages/utils/src/ ./node_modules/@mpxjs/utils/src/
cp -r ../../../packages/store/src/ ./node_modules/@mpxjs/store/src/
cp -r ../../../packages/pinia/src/ ./node_modules/@mpxjs/pinia/src/
cp -r ../../../packages/core/src/ ./node_modules/@mpxjs/core/src/
cp -r ../../../packages/fetch/src/ ./node_modules/@mpxjs/fetch/src/
cp -r ../../../packages/api-proxy/src/ ./node_modules/@mpxjs/api-proxy/src/

echo "end copy webpackPlugin"
7 changes: 0 additions & 7 deletions test/e2e/miniprogram-project/copyWebpackPlugin.sh

This file was deleted.

14 changes: 10 additions & 4 deletions test/e2e/miniprogram-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:dev": "node ./build/build.js",
"watch:cross": "npm run watch --modes=wx,ali,web",
"build:cross": "npm run build --modes=wx,ali,tt,swan",
"copyPlugin": "sh ./copyWebpackPlugin.sh",
"copyPlugin": "sh ../copyWebpackPlugin.sh",
"watch:web:serve": "npx npm-run-all --parallel watch:web serve",
"watch:web": "npm run watch --mode=web",
"serve": "npx http-server dist/web",
Expand All @@ -23,10 +23,14 @@
"author": "xuegan <[email protected]>",
"license": "ISC",
"dependencies": {
"@mpxjs/api-proxy": "^2.7.1",
"vue": "^2.6.10",
"vue-i18n": "^8.15.3",
"@mpxjs/core": "^2.7.2"
"@mpxjs/api-proxy": "^2.8.0",
"@mpxjs/core": "^2.8.0",
"@mpxjs/fetch": "^2.8.0",
"@mpxjs/pinia": "^2.8.0",
"@mpxjs/store": "^2.8.0",
"@mpxjs/utils": "^2.8.0"
},
"browserslist": [
"ios >= 9",
Expand All @@ -37,11 +41,13 @@
"@babel/plugin-transform-runtime": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/runtime-corejs3": "^7.10.4",
"@mpxjs/babel-plugin-inject-page-events": "^2.8.0",
"@mpxjs/miniprogram-simulate": "1.4.9",
"@mpxjs/mpx-jest": "0.0.16",
"@mpxjs/webpack-plugin": "^2.7.2",
"@mpxjs/webpack-plugin": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"async": "^3.2.4",
"babel-eslint": "^10.0.1",
"babel-jest": "^25.3.0",
"babel-loader": "^8.1.0",
Expand Down
7 changes: 0 additions & 7 deletions test/e2e/miniprogram-wxss-loader/copyWebpackPlugin.sh

This file was deleted.

14 changes: 9 additions & 5 deletions test/e2e/miniprogram-wxss-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build:dev": "node ./build/build.js",
"watch:cross": "npm run watch --modes=wx,ali,web",
"build:cross": "npm run build --modes=wx,ali,tt,swan",
"copyPlugin": "sh ./copyWebpackPlugin.sh",
"copyPlugin": "sh ../copyWebpackPlugin.sh",
"watch:web:serve": "npx npm-run-all --parallel watch:web serve",
"watch:web": "npm run watch --mode=web",
"serve": "npx http-server dist/web",
Expand All @@ -25,10 +25,14 @@
"author": "octoberluobin <[email protected]>",
"license": "ISC",
"dependencies": {
"@mpxjs/api-proxy": "^2.7.1",
"@mpxjs/core": "^2.7.2",
"vue": "^2.6.10",
"vue-i18n": "^8.15.3"
"vue-i18n": "^8.15.3",
"@mpxjs/api-proxy": "^2.8.0",
"@mpxjs/core": "^2.8.0",
"@mpxjs/fetch": "^2.8.0",
"@mpxjs/pinia": "^2.8.0",
"@mpxjs/store": "^2.8.0",
"@mpxjs/utils": "^2.8.0"
},
"browserslist": [
"ios >= 9",
Expand All @@ -41,7 +45,7 @@
"@babel/runtime-corejs3": "^7.10.4",
"@mpxjs/miniprogram-simulate": "1.4.9",
"@mpxjs/mpx-jest": "0.0.16",
"@mpxjs/webpack-plugin": "^2.7.55",
"@mpxjs/webpack-plugin": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"babel-eslint": "^10.0.1",
Expand Down
7 changes: 0 additions & 7 deletions test/e2e/plugin-project/copyWebpackPlugin.sh

This file was deleted.

12 changes: 8 additions & 4 deletions test/e2e/plugin-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"watch:prod": "node ./build/build.js -w -p",
"build": "node ./build/build.js -p",
"build:dev": "node ./build/build.js",
"copyPlugin": "sh ./copyWebpackPlugin.sh",
"copyPlugin": "sh ../copyWebpackPlugin.sh",
"watch:cross": "npm run watch --modes=wx,ali,web",
"build:cross": "npm run build --modes=wx,ali,web",
"watch:web:serve": "npx npm-run-all --parallel watch:web serve",
Expand All @@ -22,10 +22,14 @@
"author": "xuegan <[email protected]>",
"license": "ISC",
"dependencies": {
"@mpxjs/api-proxy": "^2.7.1",
"vue": "^2.6.10",
"vue-i18n": "^8.15.3",
"@mpxjs/core": "^2.7.2"
"@mpxjs/api-proxy": "^2.8.0",
"@mpxjs/core": "^2.8.0",
"@mpxjs/fetch": "^2.8.0",
"@mpxjs/pinia": "^2.8.0",
"@mpxjs/store": "^2.8.0",
"@mpxjs/utils": "^2.8.0"
},
"browserslist": [
"ios >= 9",
Expand All @@ -40,7 +44,7 @@
"@babel/runtime-corejs3": "^7.10.4",
"@mpxjs/miniprogram-simulate": "1.4.9",
"@mpxjs/mpx-jest": "0.0.16",
"@mpxjs/webpack-plugin": "^2.7.2",
"@mpxjs/webpack-plugin": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"autoprefixer": "^6.3.1",
Expand Down