Merge pull request #48 from minimaldesign/misc-cleanups #83
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: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type-check (astro check) | |
| run: npm run check | |
| - name: Lint CSS (stylelint) | |
| run: npm run lint:css | |
| - name: Build site | |
| run: npm run build | |
| - name: Build framework CSS artifact | |
| run: npm run build:css | |
| - name: Committed dist/ is up to date | |
| run: | | |
| git diff --exit-code dist/ || { echo '::error::dist/ is stale — run `npm run build:css` and commit the result'; exit 1; } | |
| test -z "$(git status --porcelain dist/)" || { echo '::error::dist/ has uncommitted files — run `npm run build:css` and commit the result'; exit 1; } | |
| - name: Verify dist invariants | |
| run: | | |
| set -e | |
| # layers survived the build (the preset-env polyfill must stay off) | |
| grep -q '@layer settings, base, elements, global, components, theme, helpers;' dist/mcss.css | |
| ! grep -q ':not(#' dist/mcss.css | |
| # the bundle ships zero-opinion: no theme content in mcss.css | |
| # ('@layer theme' appears in a comment; check real block syntax) | |
| ! grep -q '@layer theme {' dist/mcss.css | |
| # per-file themes self-layer so any import method lands them right | |
| grep -q '@layer theme {' dist/css/theme.wireframe.css | |
| grep -q '@layer theme {' dist/css/theme.default.css | |
| # no unresolved custom media or mixins shipped | |
| # (plain '@custom-media' appears in a comment; check real syntax) | |
| ! grep -qE '@custom-media --|media \(--' dist/mcss.css | |
| ! grep -q '@define-mixin' dist/mcss.css | |
| # no asset-path coupling | |
| ! grep -q 'assets/icons' dist/mcss.css |