Skip to content

Nightly Checks

Nightly Checks #98

Workflow file for this run

name: Nightly Checks
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
# Run checks nightly at midnight
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
prepare:
name: Prepare Targets
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
examples: ${{ steps.targets.outputs.examples }}
templates: ${{ steps.targets.outputs.templates }}
steps:
- uses: actions/checkout@v4
- name: Find all build targets
id: targets
run: |
examples=$(
find templates -mindepth 1 -maxdepth 1 -type d |
jq -cnR '[inputs | select(length > 0)]'
)
templates=$(
find templates -mindepth 1 -maxdepth 1 -type d |
jq -cnR '[inputs | select(length > 0)]'
)
echo "examples=${examples}" >> $GITHUB_OUTPUT
echo "templates=${templates}" >> $GITHUB_OUTPUT
examples:
name: Check Examples
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [prepare]
strategy:
matrix:
example: ${{ fromJSON(needs.prepare.outputs.examples) }}
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: ${{ matrix.example }}
sparse-checkout-cone-mode: false
- name: Move files to root
run: |
ls -lah
shopt -s dotglob
mv ${{ matrix.example }}/* .
rm -rf examples
ls -lah
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20.14.0
- name: Install dependencies
run: pnpm install
- run: pnpm lint
- run: pnpm check
- run: pnpm test
templates:
name: Check Templates
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [prepare]
strategy:
matrix:
template: ${{ fromJSON(needs.prepare.outputs.templates) }}
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: ${{ matrix.template }}
sparse-checkout-cone-mode: false
- name: Move files to root
run: |
ls -lah
shopt -s dotglob
mv ${{ matrix.template }}/* .
rm -rf templates
ls -lah
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20.14.0
- name: Install dependencies
run: pnpm install
- run: pnpm lint
- run: pnpm check
- run: pnpm build
- run: pnpm test