name: console-ci on: workflow_dispatch: pull_request: paths: - 'src/Web/**' - '.gitea/workflows/console-ci.yml' - 'ops/devops/console/**' jobs: lint-test-build: runs-on: ubuntu-latest defaults: run: shell: bash working-directory: src/Web env: PLAYWRIGHT_BROWSERS_PATH: ~/.cache/ms-playwright CI: true steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' cache: npm cache-dependency-path: src/Web/package-lock.json - name: Install deps (offline-friendly) run: npm ci --prefer-offline --no-audit --progress=false - name: Lint run: npm run lint -- --no-progress - name: Unit tests run: npm test -- --watch=false --browsers=ChromeHeadless --no-progress || true - name: Build run: npm run build -- --configuration=production --progress=false - name: Collect artifacts if: always() run: | mkdir -p ../artifacts cp -r dist ../artifacts/dist || true cp -r coverage ../artifacts/coverage || true find . -maxdepth 3 -type f -name "*.xml" -o -name "*.trx" -o -name "*.json" -path "*test*" -print0 | xargs -0 -I{} cp --parents {} ../artifacts 2>/dev/null || true - name: Upload artifacts if: always() uses: actions/upload-artifact@v4 with: name: console-ci-${{ github.run_id }} path: artifacts retention-days: 14