Circuit UI App Templates #105
Workflow file for this run
This file contains 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: Circuit UI App Templates | |
on: | |
schedule: | |
- cron: '0 3 * * 1' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
matrix: | |
node: [20, 22] | |
template: [astro, nextjs, remix] | |
include: | |
- template: astro | |
bootstrap: 'npx create-astro@latest ./test-app --template sumup-oss/circuit-ui/templates/astro --install --no-git --typescript=strictest' | |
verify: 'npm run lint && npm run astro check' | |
- template: nextjs | |
bootstrap: 'npx create-next-app --example "https://github.com/sumup-oss/circuit-ui/tree/main/templates/nextjs/template" test-app' | |
verify: 'npm run test:ci' | |
- template: remix | |
bootstrap: 'npx create-remix@latest ./test-app --template https://github.com/sumup-oss/circuit-ui/tree/main/templates/remix --install --no-git-init' | |
verify: 'npm run lint && npm run typecheck' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Bootstrap app | |
run: ${{ matrix.bootstrap }} | |
- name: Build app | |
working-directory: ./test-app | |
run: npm run build | |
- name: Static analysis | |
working-directory: ./test-app | |
run: ${{ matrix.verify }} | |
- name: Install test dependencies | |
run: npm install puppeteer | |
- name: Test app | |
working-directory: ./test-app | |
# We use aa-exec since Ubuntu 24.04's AppArmor profile blocks the use | |
# of puppeteer otherwise, see | |
# https://github.com/puppeteer/puppeteer/issues/12818 | |
run: npx start-server-and-test 'npm run start -- --port=3000' localhost:3000 "aa-exec --profile=chrome node ../scripts/verify-template.js" |