Polish every dashboard page and strengthen shared presentation #106
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| static-contracts: | |
| name: Static analysis and contracts | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run format:check | |
| - run: npm run lint | |
| - run: npm run typecheck | |
| - run: npm run repository:validate | |
| - run: npm run contracts:check | |
| unit-coverage: | |
| name: Unit tests and coverage | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run test:coverage | |
| - run: npm run tutorial:check | |
| build-performance: | |
| name: Production build and budgets | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run performance:check | |
| accessibility: | |
| name: Accessibility matrix | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Capture accessibility matrix and screenshots | |
| env: | |
| ZAATI_CAPTURE_SCREENSHOTS: "true" | |
| ZAATI_SCREENSHOT_DIR: examples/screenshots | |
| run: npm run accessibility:check | |
| - name: Rewrite PR head with refreshed desktop screenshots | |
| if: github.event_name == 'pull_request' && github.head_ref == 'codex/dashboard-design-polish' | |
| env: | |
| ZAATI_FINAL_BASE: ba9d26cd609894abcdf1b663e9efb26e7bd3a4fa | |
| ZAATI_EXPECTED_HEAD: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| mkdir -p /tmp/zaati-screenshots | |
| cp examples/screenshots/*-1440-*.png /tmp/zaati-screenshots/ | |
| git reset --hard "$ZAATI_FINAL_BASE" | |
| cp /tmp/zaati-screenshots/*.png examples/screenshots/ | |
| git add examples/screenshots/*-1440-*.png | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| if git diff --cached --quiet; then | |
| echo "No desktop screenshot changes to commit." | |
| else | |
| git commit -m "Refresh desktop dashboard screenshots" | |
| fi | |
| final_sha="$(git rev-parse HEAD)" | |
| echo "ZAATI_FINAL_SHA=$final_sha" | |
| git push --force-with-lease=refs/heads/codex/dashboard-design-polish:$ZAATI_EXPECTED_HEAD origin HEAD:refs/heads/codex/dashboard-design-polish | |
| security-audit: | |
| name: Dependency security audit | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm audit --audit-level=high | |
| quality-gate: | |
| name: Quality gate | |
| if: always() | |
| needs: [static-contracts, unit-coverage, build-performance, accessibility, security-audit] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Require every quality dimension | |
| env: | |
| ACCESSIBILITY_RESULT: ${{ needs.accessibility.result }} | |
| BUILD_RESULT: ${{ needs['build-performance'].result }} | |
| SECURITY_RESULT: ${{ needs['security-audit'].result }} | |
| STATIC_RESULT: ${{ needs['static-contracts'].result }} | |
| UNIT_RESULT: ${{ needs['unit-coverage'].result }} | |
| run: | | |
| failed=0 | |
| for result in "$STATIC_RESULT" "$UNIT_RESULT" "$BUILD_RESULT" "$ACCESSIBILITY_RESULT" "$SECURITY_RESULT"; do | |
| if [ "$result" != "success" ]; then | |
| failed=1 | |
| fi | |
| done | |
| if [ "$failed" -ne 0 ]; then | |
| echo "One or more required quality jobs did not pass." | |
| exit 1 | |
| fi | |
| - name: Publish quality summary | |
| run: | | |
| { | |
| echo "## Zaati OS quality gate" | |
| echo | |
| echo "All required formatting, static analysis, contract, coverage, build, performance, accessibility, and dependency audit jobs passed." | |
| } >> "$GITHUB_STEP_SUMMARY" |