提交 b966ddd8 编写于 作者: fxy060608's avatar fxy060608

chore: workflows

上级 495a786f
......@@ -7,25 +7,59 @@ on:
branches:
- next
jobs:
cypress-run:
runs-on: ubuntu-latest
ssr:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [12]
include:
- os: macos-latest
node_version: 12
- os: windows-latest
node_version: 12
fail-fast: false
name: 'ssr: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: yarn
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Versions
run: yarn versions
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build all
run: npm run build
- name: Install ssr
working-directory: ./packages/playground/ssr
run: yarn
run: yarn install --frozen-lockfile
- name: Cypress run
uses: cypress-io/github-action@v2
with:
install: false
start: |
cd ./packages/playground/ssr
npm run dev:ssr
start: npm run e2e:dev:ssr
project: ./packages/playground/ssr
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
......
......@@ -12,7 +12,8 @@
"ls-lint": "ls-lint",
"test": "jest",
"preinstall": "node ./scripts/checkYarn.js",
"e2e:ssr": "cypress open --project packages/playground/ssr"
"e2e:ssr": "cypress open --project packages/playground/ssr",
"e2e:dev:ssr": "cd packages/playground/ssr && npm run dev:ssr"
},
"types": "test-dts/index.d.ts",
"tsd": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册