Skip to content

Commit

Permalink
Add the CI file .github/workflows/test-lite.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Feb 6, 2024
1 parent b4b6ea0 commit 554c709
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/test-lite.yml
@@ -0,0 +1,61 @@
name: "test / lite"

on:
workflow_run:
workflows: ["trigger"]
types:
- requested

permissions:
statuses: write

concurrency:
group: "${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}-${{ github.workflow_ref }}"
cancel-in-progress: true

jobs:
changes:
name: "changes"
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.changes.outputs.should_run }}
sha: ${{ steps.changes.outputs.sha }}
merge_sha: ${{ steps.changes.outputs.merge_sha }}
pr_number: ${{ steps.changes.outputs.pr_number }}
source_branch: ${{ steps.changes.outputs.source_branch }}
source_repo: ${{ steps.changes.outputs.source_repo }}
mergeable: ${{ steps.changes.outputs.mergeable }}
steps:
- uses: actions/checkout@v4
- uses: "gradio-app/gradio/.github/actions/changes@main"
id: changes
with:
type: "functional"
token: ${{ secrets.GITHUB_TOKEN }}
- name: echo github context
if: always()
run: echo "${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}-${{ github.workflow_ref }}"

test-lite-functional:
name: "test-lite-functional"
needs: changes
if: needs.changes.outputs.should_run == 'true'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.changes.outputs.merge_sha }}
repository: ${{ needs.changes.outputs.mergeable == 'true' && github.repository || needs.changes.outputs.source_repo }}
- name: install dependencies
id: install_deps
uses: "./.github/actions/install-all-deps"
with:
always-install-pnpm: true
skip_build: true
- run: pnpm exec playwright install chromium
- run: python -m pip install build
- run: pnpm --filter @gradio/client build
- run: pnpm --filter @gradio/wasm build
- run: pnpm --filter @gradio/app pybuild
- run: pnpm --filter @gradio/app test:browser:lite

0 comments on commit 554c709

Please sign in to comment.