Skip to content

Merge branch 'fix-drn' of github.com:didi/mpx into fix-drn #9887

Merge branch 'fix-drn' of github.com:didi/mpx into fix-drn

Merge branch 'fix-drn' of github.com:didi/mpx into fix-drn #9887

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i && npm run tsc:build
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i && npm run lint
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
id: cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
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
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- 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
- name: copy-webpack-plugin
run: npm run copyPlugin --prefix test/e2e/miniprogram-project && npm run copyPlugin --prefix test/e2e/plugin-project
- 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: exec unit test
run: npm t && npm t --prefix test/e2e/miniprogram-project && npm t --prefix test/e2e/plugin-project