all: fix formatting #266
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: WebUI Tests | |
| on: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: "The git ref to checkout" | |
| required: false | |
| type: string | |
| default: "" | |
| working-directory: | |
| description: "Working directory for the workflow" | |
| required: false | |
| type: string | |
| default: "." | |
| push: | |
| branches-ignore: | |
| - "queue-main-*" | |
| - "queue-dev-*" | |
| paths: | |
| - "webui/**" | |
| pull_request: | |
| paths: | |
| - "webui/**" | |
| jobs: | |
| test: | |
| runs-on: linux-x64-ubuntu-latest-8-core | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: ${{ inputs.working-directory || '.'}}/webui/package-lock.json | |
| - name: Optimize APT | |
| working-directory: ${{ inputs.working-directory || '.'}} | |
| run: | | |
| pwd | |
| ./.github/scripts/optimize-apt.sh | |
| - name: Install dependencies | |
| working-directory: ${{ inputs.working-directory || '.'}}/webui | |
| run: npm ci | |
| - name: Install Playwright Chromium | |
| working-directory: ${{ inputs.working-directory || '.'}}/webui | |
| run: npx playwright install chromium --with-deps | |
| - name: Run tests | |
| working-directory: ${{ inputs.working-directory || '.'}}/webui | |
| run: npm run test | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: ${{ inputs.working-directory || '.'}}/webui/playwright-report/ | |
| retention-days: 7 |