Felipe97/llama-cpp-compiled
01.2k
1name: UI (self-hosted)2 3# these are the same as ui.yml, but with self-hosted runners4# the jobs are lighter because they don't need to install Node.js or Playwright browsers5# the runner has pre-installed Playwright browsers for @playwright/test (1.56.1) at /ms-playwright/6 7on:8 workflow_dispatch:9 inputs:10 sha:11 description: 'Commit SHA1 to build'12 required: false13 type: string14 push:15 branches:16 - master17 paths: [18 '.github/workflows/ui-self-hosted.yml',19 '.github/workflows/ui-build-self-hosted.yml',20 'tools/ui/**.*',21 'tools/server/tests/**.*'22 ]23 pull_request:24 types: [opened, synchronize, reopened]25 paths: [26 '.github/workflows/ui-self-hosted.yml',27 '.github/workflows/ui-build-self-hosted.yml',28 'tools/ui/**.*',29 'tools/server/tests/**.*'30 ]31 32env:33 LLAMA_ARG_LOG_COLORS: 134 LLAMA_ARG_LOG_PREFIX: 135 LLAMA_ARG_LOG_TIMESTAMPS: 136 LLAMA_ARG_LOG_VERBOSITY: 1037 38concurrency:39 group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}40 cancel-in-progress: true41 42jobs:43 ui-build:44 name: Build static output45 uses: ./.github/workflows/ui-build-self-hosted.yml46 47 ui-checks:48 name: Checks49 needs: ui-build50 runs-on: [self-hosted, PLAYWRIGHT]51 continue-on-error: true52 steps:53 - name: Checkout code54 uses: actions/checkout@v655 with:56 fetch-depth: 057 ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}58 59 - name: Install dependencies60 id: setup61 run: npm ci62 working-directory: tools/ui63 64 - name: Download built UI artifacts65 uses: actions/download-artifact@v666 with:67 name: llama-ui.zip68 path: tools/ui/dist/69 70 - name: Run type checking71 if: ${{ always() && steps.setup.conclusion == 'success' }}72 run: npm run check73 working-directory: tools/ui74 75 - name: Run linting76 if: ${{ always() && steps.setup.conclusion == 'success' }}77 run: npm run lint78 working-directory: tools/ui79 80 - name: Run Client tests81 if: ${{ always() && steps.setup.conclusion == 'success' }}82 run: npm run test:client83 working-directory: tools/ui84 85 - name: Run Unit tests86 if: ${{ always() && steps.setup.conclusion == 'success' }}87 run: npm run test:unit88 working-directory: tools/ui89 90 e2e-tests:91 name: E2E Tests92 needs: ui-build93 runs-on: [self-hosted, PLAYWRIGHT]94 steps:95 - name: Checkout code96 uses: actions/checkout@v697 with:98 fetch-depth: 099 ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}100 101 - name: Install dependencies102 id: setup103 run: npm ci104 working-directory: tools/ui105 106 - name: Download built UI artifacts107 uses: actions/download-artifact@v6108 with:109 name: llama-ui.zip110 path: tools/ui/dist/111 112 - name: Build Storybook113 if: ${{ always() && steps.setup.conclusion == 'success' }}114 run: npm run build-storybook115 working-directory: tools/ui116 117 - name: Run UI tests118 if: ${{ always() && steps.setup.conclusion == 'success' }}119 run: npm run test:ui -- --testTimeout=60000120 working-directory: tools/ui121 122 - name: Run E2E tests123 if: ${{ always() && steps.setup.conclusion == 'success' }}124 run: npm run test:e2e125 working-directory: tools/ui126 