Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - time-tracker-ui
name: CD process to deploy to App-Service service

on:
push:
# Trigger the workflow on pull request but only for the master branch
pull_request:
types: [closed]
branches:
- master

jobs:
build-and-deploy:
name: Deploy to Azure
runs-on: ubuntu-latest

timeout-minutes: 60
steps:
- uses: actions/checkout@master
- name: Checkout of master
uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: npm install, build, and test
- name: 'run: npm install and build'
run: |
npm install
npm run build --if-present
# npm run test --if-present
npm run build --prod --if-present

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v1
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/CI-time-tracker-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI process for time-tracker app

on:
# Trigger the workflow on push or pull request
push:
branches:
- '*'
- '*/*'
- '!master'

pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- master

jobs:
security-audit:
name: Running npm audit
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Clone and checkout branch
uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Security Audit
run: npm audit --audit-level=moderate

ci-test:
name: Running unit tests
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Clone and checkout branch
uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Install dependencies
run: npm install

- name: Run the test
run: npm run ci-test --if-present
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"ci-test": "ng test --no-watch --no-progress --browsers ChromeHeadless",
"lint": "ng lint",
"e2e": "ng e2e"
},
Expand Down