Skip to content

fix: isolate tests from CI environment variables #111

fix: isolate tests from CI environment variables

fix: isolate tests from CI environment variables #111

Workflow file for this run

name: Build and test
on:
push:
branches: [main, big-update]
jobs:
build-test-and-deploy:
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: Verify ng add works
run: |
cd src/dist && npm link && cd ../..
npm install -g @angular/cli
ng new test-app --defaults
cd test-app
npm link angular-cli-ghpages
ng add angular-cli-ghpages
# CI test only: Verifies that the gh-pages branch gets updated
# This is NOT a production deployment - there is no public website for angular-cli-ghpages
- name: Deploy
if: github.ref == 'refs/heads/main'
working-directory: test-app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ng deploy --name="The Buildbot" --email="buildbot@angular2buch.de" --cname=angular-cli-ghpages.angular.schule