gradio/.github/workflows/ui.yml
pngwn a039810e51
fix pnpm filters for 7.x (#1927)
* fix pnpm filters for 7.x

* update ci to use pnpm 7

* try a thing

* reinstall types

* usin pnpm dlx instead of pnpx

* usin pnpm dlx instead of pnpx

* explicitly add playwright as dependency

* update lockfile

* update ci

* update ci

* install same version of @playwright/test and playwright

* fix browser downloads
2022-08-02 12:02:06 -07:00

67 lines
1.6 KiB
YAML

name: gradio-ui
on:
push:
branches:
- "main"
pull_request:
defaults:
run:
working-directory: ui
env:
CI: true
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
NODE_OPTIONS: "--max-old-space-size=4096"
concurrency:
group: deploy-${{ github.ref }}-${{ github.event_name == 'push' || github.event.inputs.fire != null }}
cancel-in-progress: true
jobs:
quick-checks:
name: static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
- name: install dependencies
run: pnpm i --frozen-lockfile
- name: formatting check
run: pnpm format:check
- name: typecheck
run: pnpm ts:check
- name: unit tests
run: pnpm test:run
functional-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install chromium
- run: pnpm build
- run: pnpm test:browser
- name: Upload failed tests screenshots
if: failure()
uses: actions/upload-artifact@v3
with:
retention-days: 3
name: test-failure-${{ github.run_id }}
path: ui/packages/app/test-results