fix: isolate tests from CI environment variables #111
Workflow file for this run
This file contains hidden or 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: 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 |