Skip to content

Commit

Permalink
Merge pull request #104 from rajutkarsh07/ci
Browse files Browse the repository at this point in the history
fixed ci
  • Loading branch information
rajutkarsh07 authored Nov 12, 2024
2 parents e6636c9 + f54ddca commit 5ba9e4d
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [feature/webiu-2024]

jobs:
build-and-deploy:
name: Build, Test, and Deploy Angular (webiu-ui)
build-webiu-ui:
name: Build and Test Angular (webiu-ui)
runs-on: ubuntu-latest

steps:
Expand All @@ -20,28 +20,37 @@ jobs:
with:
node-version: '20'

- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: feature/webiu-2024

- name: Fetch pull request changes
run: |
git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge:pr
git checkout pr
- name: Install Angular CLI
run: npm install -g @angular/cli
run: |
cd webiu-ui
npm install -g @angular/cli
- name: Install dependencies
run: |
cd webiu-ui
npm install
- name: Build Angular App
- name: Install Chrome
run: |
cd webiu-ui
ng build --output-path=../docs --base-href="/Webiu/"
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Run Angular Tests
env:
CHROME_BIN: google-chrome
- name: Build Angular App
run: |
cd webiu-ui
ng test --watch=false --browsers=ChromeHeadless --no-sandbox
npm run build
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/feature/webiu-2024'
- name: Run Angular Tests
run: |
cd webiu-ui
ngh --dir=../docs
npm test -- --browsers=ChromeHeadless --watch=false

0 comments on commit 5ba9e4d

Please sign in to comment.