Skip to content

docs: blog/my-article as the only example #19

docs: blog/my-article as the only example

docs: blog/my-article as the only example #19

Workflow file for this run

name: Build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: src/package-lock.json
- name: Build and test
working-directory: src
run: |
npm ci
npm run build
npm run test
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: src/dist
retention-days: 1
# Builds a fresh Angular app with SSG and checks the "file" output end to end,
# for the lowest and the latest supported Angular 22 version.
# See .github/scripts/test-angular-app.sh for the checks.
test-angular-versions:
needs: build-and-test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- cli: '22.0'
range: '~22.0.0'
- cli: '22'
range: '^22.0.0'
name: test-angular (${{ matrix.range }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: dist
path: src/dist
- name: Pack @angular-schule/prerender-format
working-directory: src/dist
run: npm pack --pack-destination /tmp
- name: Test Angular ${{ matrix.range }}
run: |
cd /tmp
bash "$GITHUB_WORKSPACE/.github/scripts/test-angular-app.sh" \
"npx --yes @angular/cli@${{ matrix.cli }}" \
"$(ls /tmp/angular-schule-prerender-format-*.tgz)" \
"${{ matrix.range }}"