2021-02-02 15:23:12 +08:00
|
|
|
name: PR test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-02-20 12:34:43 +08:00
|
|
|
branches: ['**']
|
2021-02-02 15:23:12 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-25 10:40:50 +08:00
|
|
|
node-version: [20.x]
|
2021-02-02 15:23:12 +08:00
|
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
|
|
|
|
steps:
|
2024-07-16 10:38:07 +08:00
|
|
|
- uses: actions/checkout@v4
|
2021-02-02 15:23:12 +08:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2024-07-16 10:38:07 +08:00
|
|
|
uses: actions/setup-node@v4
|
2021-02-02 15:23:12 +08:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-05-05 17:13:06 +08:00
|
|
|
- name: npm install
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: '--max-old-space-size=8192'
|
2021-02-02 15:23:12 +08:00
|
|
|
run: |
|
2022-02-10 14:35:40 +08:00
|
|
|
npm i --legacy-peer-deps
|
2023-07-03 14:31:27 +08:00
|
|
|
cd packages/office-viewer
|
2023-04-21 16:53:40 +08:00
|
|
|
npm i --legacy-peer-deps
|
|
|
|
cd ../../
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: build amis-formula
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis-formula
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: build amis-core
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis-core
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: build amis-ui
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis-ui
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: build amis
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: check schema.json
|
|
|
|
run: |
|
|
|
|
cp ./packages/amis/schema.json .
|
|
|
|
- name: build amis-editor-core
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis-editor-core
|
2024-04-25 10:32:54 +08:00
|
|
|
- name: build amis-editor
|
|
|
|
run: |
|
2023-05-05 17:13:06 +08:00
|
|
|
npm run build --workspace amis-editor
|
|
|
|
- name: typescript check
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: '--max-old-space-size=8192'
|
|
|
|
run: |
|
|
|
|
npm run typecheck
|
|
|
|
- name: test
|
|
|
|
run: |
|
2022-06-02 13:28:23 +08:00
|
|
|
npm test --workspaces
|
2023-07-03 14:31:27 +08:00
|
|
|
cd packages/office-viewer
|
2023-05-05 21:39:45 +08:00
|
|
|
npm test
|
|
|
|
cd ../../
|
2021-10-13 12:21:26 +08:00
|
|
|
sh deploy-gh-pages.sh
|