2022-02-02 23:49:37 +08:00
|
|
|
name: gradio-ui
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-03-23 23:19:12 +08:00
|
|
|
branches:
|
|
|
|
- "main"
|
2022-02-02 23:49:37 +08:00
|
|
|
pull_request:
|
|
|
|
|
2022-03-23 23:19:12 +08:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
2022-04-19 03:26:30 +08:00
|
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
2022-02-02 23:49:37 +08:00
|
|
|
|
2022-02-23 20:29:39 +08:00
|
|
|
concurrency:
|
|
|
|
group: deploy-${{ github.ref }}-${{ github.event_name == 'push' || github.event.inputs.fire != null }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-02-02 23:49:37 +08:00
|
|
|
jobs:
|
2022-03-23 23:19:12 +08:00
|
|
|
quick-checks:
|
2022-02-02 23:49:37 +08:00
|
|
|
name: static checks
|
2022-10-13 00:30:42 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2022-02-02 23:49:37 +08:00
|
|
|
steps:
|
2022-03-23 23:19:12 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-03 18:54:21 +08:00
|
|
|
- name: install dependencies
|
2023-06-20 04:02:03 +08:00
|
|
|
uses: "./.github/actions/install-frontend-deps"
|
|
|
|
with:
|
|
|
|
always-install-pnpm: true
|
2023-04-03 21:33:01 +08:00
|
|
|
- name: build client
|
|
|
|
run: pnpm --filter @gradio/client build
|
2023-06-27 15:09:50 +08:00
|
|
|
- name: build the wasm module
|
|
|
|
run: pnpm --filter @gradio/wasm build
|
2023-06-22 18:25:27 +08:00
|
|
|
- name: lint
|
|
|
|
run: pnpm lint
|
|
|
|
continue-on-error: true
|
2022-02-03 18:54:21 +08:00
|
|
|
- name: typecheck
|
2022-02-02 23:49:37 +08:00
|
|
|
run: pnpm ts:check
|
2022-02-14 23:24:04 +08:00
|
|
|
- name: unit tests
|
|
|
|
run: pnpm test:run
|
2022-03-23 23:19:12 +08:00
|
|
|
functional-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-06-20 04:02:03 +08:00
|
|
|
- name: install dependencies
|
|
|
|
uses: "./.github/actions/install-all-deps"
|
2022-10-13 00:43:44 +08:00
|
|
|
with:
|
2023-06-20 04:02:03 +08:00
|
|
|
always-install-pnpm: true
|
|
|
|
- name: install outbreak_forecast dependencies
|
|
|
|
run: |
|
|
|
|
. venv/bin/activate
|
|
|
|
python -m pip install -r demo/outbreak_forecast/requirements.txt
|
2022-08-03 03:02:06 +08:00
|
|
|
- run: pnpm exec playwright install chromium
|
2023-06-20 04:02:03 +08:00
|
|
|
- name: run browser tests
|
|
|
|
run: |
|
|
|
|
. venv/bin/activate
|
|
|
|
pnpm test:browser
|
2023-06-27 22:28:27 +08:00
|
|
|
- name: run browser component tests
|
|
|
|
run: |
|
|
|
|
. venv/bin/activate
|
|
|
|
pnpm run test:ct
|