release: ship AuraGlass 3.2.0 native app chrome #143
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: AuraGlass Design System Compliance | |
| on: | |
| push: | |
| branches: [ main, develop, feat/* ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| design-system-compliance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for git diff | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run TypeScript check | |
| run: npm run typecheck | |
| - name: Run ESLint (Design System Rules) | |
| run: npm run lint:check | |
| - name: Run Token Linter | |
| run: npm run lint:tokens | |
| continue-on-error: false | |
| - name: Run Style Audit | |
| run: npm run lint:styles | |
| continue-on-error: false | |
| - name: Run Glass Validation | |
| run: npm run glass:validate | |
| continue-on-error: false | |
| - name: Run Glass Contrast Tests | |
| run: npm run test:glass-contrast | |
| continue-on-error: false | |
| - name: Generate Design System Report | |
| run: | | |
| echo "## π― AuraGlass Design System Compliance Report" > design-system-report.md | |
| echo "" >> design-system-report.md | |
| echo "### Token Compliance" >> design-system-report.md | |
| npm run lint:tokens 2>&1 | tee -a design-system-report.md || true | |
| echo "" >> design-system-report.md | |
| echo "### Style Audit" >> design-system-report.md | |
| npm run lint:styles 2>&1 | tee -a design-system-report.md || true | |
| echo "" >> design-system-report.md | |
| echo "### Glass Validation" >> design-system-report.md | |
| npm run glass:validate 2>&1 | tee -a design-system-report.md || true | |
| continue-on-error: true | |
| - name: Upload Design System Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: design-system-report | |
| path: design-system-report.md | |
| retention-days: 30 | |
| - name: Comment PR with Design System Report | |
| if: github.event_name == 'pull_request' | |
| continue-on-error: true | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| let report = ''; | |
| try { | |
| report = fs.readFileSync('design-system-report.md', 'utf8'); | |
| } catch (e) { | |
| report = '## Design System Report\n\nReport generation failed.'; | |
| } | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: report | |
| }); | |
| design-system-score: | |
| runs-on: ubuntu-latest | |
| needs: design-system-compliance | |
| if: always() | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Calculate Design System Score | |
| id: score | |
| run: | | |
| # Run all checks and calculate score | |
| TOTAL_CHECKS=5 | |
| PASSED_CHECKS=0 | |
| # TypeScript check (20 points) | |
| if npm run typecheck; then | |
| PASSED_CHECKS=$((PASSED_CHECKS + 1)) | |
| echo "β TypeScript: PASS" | |
| else | |
| echo "β TypeScript: FAIL" | |
| fi | |
| # ESLint check (20 points) | |
| if npm run lint:check; then | |
| PASSED_CHECKS=$((PASSED_CHECKS + 1)) | |
| echo "β ESLint: PASS" | |
| else | |
| echo "β ESLint: FAIL" | |
| fi | |
| # Token compliance (20 points) | |
| if npm run lint:tokens; then | |
| PASSED_CHECKS=$((PASSED_CHECKS + 1)) | |
| echo "β Token Compliance: PASS" | |
| else | |
| echo "β Token Compliance: FAIL" | |
| fi | |
| # Style audit (20 points) | |
| if npm run lint:styles; then | |
| PASSED_CHECKS=$((PASSED_CHECKS + 1)) | |
| echo "β Style Audit: PASS" | |
| else | |
| echo "β Style Audit: FAIL" | |
| fi | |
| # Glass validation (20 points) | |
| if npm run glass:validate; then | |
| PASSED_CHECKS=$((PASSED_CHECKS + 1)) | |
| echo "β Glass Validation: PASS" | |
| else | |
| echo "β Glass Validation: FAIL" | |
| fi | |
| SCORE=$((PASSED_CHECKS * 20)) | |
| echo "score=$SCORE" >> $GITHUB_OUTPUT | |
| echo "passed=$PASSED_CHECKS" >> $GITHUB_OUTPUT | |
| echo "total=$TOTAL_CHECKS" >> $GITHUB_OUTPUT | |
| echo "π― Design System Score: $SCORE/100" | |
| if [ $SCORE -eq 100 ]; then | |
| echo "π Perfect design system compliance!" | |
| elif [ $SCORE -ge 80 ]; then | |
| echo "π Excellent design system compliance!" | |
| elif [ $SCORE -ge 60 ]; then | |
| echo "β οΈ Good design system compliance, room for improvement" | |
| else | |
| echo "β Design system compliance needs attention" | |
| exit 1 | |
| fi | |
| - name: Create Status Badge | |
| run: | | |
| SCORE=${{ steps.score.outputs.score }} | |
| if [ $SCORE -eq 100 ]; then | |
| COLOR="brightgreen" | |
| MESSAGE="100%25%20perfect" | |
| elif [ $SCORE -ge 80 ]; then | |
| COLOR="green" | |
| MESSAGE="$SCORE%25%20excellent" | |
| elif [ $SCORE -ge 60 ]; then | |
| COLOR="yellow" | |
| MESSAGE="$SCORE%25%20good" | |
| else | |
| COLOR="red" | |
| MESSAGE="$SCORE%25%20needs%20work" | |
| fi | |
| echo "Badge: https://img.shields.io/badge/Design%20System-$MESSAGE-$COLOR" |