Update app.component.spec.ts #20
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: Test CI trigger | |
| on: [push] | |
| jobs: | |
| frontend-build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - run: echo "Workflow triggered!" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '21' | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: ./ | |
| - name: Run Angular unit tests | |
| run: npm run test -- --watch=false --browsers=ChromeHeadless | |
| working-directory: ./ | |
| - name: Build Angular app | |
| run: npm run build | |
| working-directory: ./ | |
| gh-pages-deploy: | |
| runs-on: ubuntu-latest | |
| needs: frontend-build-and-test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '21' | |
| - name: Build Angular app | |
| run: | | |
| npm install | |
| npm run build | |
| working-directory: ./ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [frontend-build-and-test, gh-pages-deploy] | |
| steps: | |
| - name: Final deployment | |
| run: echo "Deployment done" |