Skip to content

Commit

Permalink
Lint templates in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Dec 4, 2023
1 parent d0a3818 commit 37c54e3
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
matrix:
node: [18, 20]
template:
[
'npx create-next-app --example "https://github.com/sumup-oss/circuit-ui/tree/main/packages/cna-template/template" test-app',
'npx create-remix@latest ./test-app --template https://github.com/sumup-oss/circuit-ui/tree/main/packages/remix-template --install --no-git-init',
'npx create-astro@latest ./test-app --template sumup-oss/circuit-ui/packages/astro-template --install --no-git --typescript=strictest',
]
template: [astro, nextjs, remix]
include:
- template: astro
bootstrap: 'npx create-astro@latest ./test-app --template sumup-oss/circuit-ui/packages/astro-template --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/packages/cna-template/template" test-app'
verify: 'npm run lint && npm run test'
- template: remix
bootstrap: 'npx create-remix@latest ./test-app --template https://github.com/sumup-oss/circuit-ui/tree/main/packages/remix-template --install --no-git-init'
verify: 'npm run lint && npm run typecheck'

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -28,12 +35,16 @@ jobs:
cache: 'npm'

- name: Bootstrap app
run: ${{ matrix.template }}
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

Expand Down

1 comment on commit 37c54e3

@vercel
Copy link

@vercel vercel bot commented on 37c54e3 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.