Merge pull request #38 from dcondrey/dependabot/npm_and_yarn/all-mino… #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
| # CI: build the framework + templates and lint every email output on push and PR. | |
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| # Nothing here needs the bundled Chromium (that is only for screenshots). | |
| - name: Install | |
| run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "true" | |
| - name: Build framework (preview + production) | |
| run: | | |
| node framework/build/build.mjs | |
| node framework/build/build.mjs --production --out ../dist/email.min.html | |
| - name: Build templates | |
| run: | | |
| node scripts/build-template.mjs templates/cairn-wellness | |
| node scripts/build-template.mjs templates/ferry-street-brewing | |
| node scripts/build-template.mjs templates/lantern-and-quill | |
| node scripts/build-template.mjs templates/voltline | |
| node scripts/build-template.mjs templates/meridian-advisory | |
| - name: Lint email output (fails the build, not the inbox) | |
| run: npm run lint | |
| - name: Self-test the linter (fixtures must pass/fail as expected) | |
| run: node framework/build/lint.test.mjs | |
| - name: Fuzz the rule set (crashes + pathological backtracking) | |
| run: node framework/build/fuzz.test.js | |
| - name: Assert build output is committed (no drift) | |
| run: git diff --exit-code -- framework/dist framework/template.html templates/*/dist | |
| # Render smoke-test runs separately: it needs a browser (the build job above is | |
| # deliberately Chrome-free). ubuntu-latest ships google-chrome-stable, which | |
| # puppeteer picks up via channel:'chrome'. | |
| smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "true" | |
| - name: Build framework + templates | |
| run: npm run build | |
| - name: Render smoke-test (broken images, overflow, page errors) | |
| run: npm run smoke |