Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed ci #104

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading