Skip to content

Commit 8bdf62c

Browse files
committed
fix(time-tracker-ui):implement-semantic-version-test1
1 parent 71b59cf commit 8bdf62c

File tree

4 files changed

+6088
-308
lines changed

4 files changed

+6088
-308
lines changed
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
1+
# # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2+
# # More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: CD process to deploy to App-Service service
4+
# name: CD process to deploy to App-Service service
55

6-
on:
7-
# Trigger the workflow on pull request but only for the master branch
8-
pull_request:
9-
types: [closed]
10-
branches:
11-
- master
6+
# on:
7+
# # Trigger the workflow on pull request but only for the master branch
8+
# pull_request:
9+
# types: [closed]
10+
# branches:
11+
# - master
1212

13-
jobs:
14-
build-and-deploy:
15-
name: Deploy to Azure
16-
runs-on: ubuntu-latest
17-
timeout-minutes: 60
18-
steps:
19-
- name: Checkout of master
20-
uses: actions/checkout@master
13+
# jobs:
14+
# build-and-deploy:
15+
# name: Deploy to Azure
16+
# runs-on: ubuntu-latest
17+
# timeout-minutes: 60
18+
# steps:
19+
# - name: Checkout of master
20+
# uses: actions/checkout@master
2121

22-
- name: Set up Node.js version
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: '12.x'
22+
# - name: Set up Node.js version
23+
# uses: actions/setup-node@v1
24+
# with:
25+
# node-version: '12.x'
2626

27-
- name: Inject Secrets
28-
shell: python
29-
env:
30-
SCOPES: ${{ secrets.scopes }}
31-
CLIENT_ID: ${{ secrets.client_id }}
32-
AUTHORITY: ${{ secrets.authority }}
33-
BASE_PATH: "src/environments/"
34-
run: |
35-
import os
36-
import json
37-
data = {}
38-
base_path = os.environ.get('BASE_PATH', 'src/environments/')
39-
with open(base_path + "keys.example.json", "r+") as jsonFileRead:
40-
data = json.load(jsonFileRead)
41-
data["scopes"] = str(os.environ['SCOPES']).split(",")
42-
data["client_id"] = os.environ['CLIENT_ID']
43-
data["authority"] = os.environ['AUTHORITY']
44-
with open(base_path + ".keys.json", "w+") as jsonFileWrite:
45-
json.dump(data, jsonFileWrite)
27+
# - name: Inject Secrets
28+
# shell: python
29+
# env:
30+
# SCOPES: ${{ secrets.scopes }}
31+
# CLIENT_ID: ${{ secrets.client_id }}
32+
# AUTHORITY: ${{ secrets.authority }}
33+
# BASE_PATH: "src/environments/"
34+
# run: |
35+
# import os
36+
# import json
37+
# data = {}
38+
# base_path = os.environ.get('BASE_PATH', 'src/environments/')
39+
# with open(base_path + "keys.example.json", "r+") as jsonFileRead:
40+
# data = json.load(jsonFileRead)
41+
# data["scopes"] = str(os.environ['SCOPES']).split(",")
42+
# data["client_id"] = os.environ['CLIENT_ID']
43+
# data["authority"] = os.environ['AUTHORITY']
44+
# with open(base_path + ".keys.json", "w+") as jsonFileWrite:
45+
# json.dump(data, jsonFileWrite)
4646

47-
- name: 'run: npm install and build'
48-
run: |
49-
npm install
50-
npm run build --prod --if-present
47+
# - name: 'run: npm install and build'
48+
# run: |
49+
# npm install
50+
# npm run build --prod --if-present
5151

52-
- name: 'Deploy to Azure Web App'
53-
uses: azure/webapps-deploy@v1
54-
with:
55-
app-name: 'time-tracker-ui'
56-
slot-name: 'production'
57-
publish-profile: ${{ secrets.AzureAppService_PublishProfile_728dc744f9384bf38e8a0446aaaee29d }}
58-
package: dist/time-tracker
52+
# - name: 'Deploy to Azure Web App'
53+
# uses: azure/webapps-deploy@v1
54+
# with:
55+
# app-name: 'time-tracker-ui'
56+
# slot-name: 'production'
57+
# publish-profile: ${{ secrets.AzureAppService_PublishProfile_728dc744f9384bf38e8a0446aaaee29d }}
58+
# package: dist/time-tracker
Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
name: CI process for time-tracker app
22

33
on:
4-
pull_request:
5-
types: [opened, edited, reopened, synchronize]
4+
# pull_request:
5+
# types: [opened, edited, reopened, synchronize]
6+
push:
67
branches:
7-
- master
8+
- 48-implement-semantic-version
89

910
jobs:
10-
security-audit:
11-
name: Running npm audit
12-
runs-on: ubuntu-latest
13-
timeout-minutes: 60
14-
steps:
15-
- name: Clone and checkout branch
16-
uses: actions/checkout@master
11+
# security-audit:
12+
# name: Running npm audit
13+
# runs-on: ubuntu-latest
14+
# timeout-minutes: 60
15+
# steps:
16+
# # - name: Clone and checkout branch
17+
# # uses: actions/checkout@master
1718

18-
- name: Set up Node.js version
19-
uses: actions/setup-node@v1
20-
with:
21-
node-version: '12.x'
19+
# # - name: Set up Node.js version
20+
# # uses: actions/setup-node@v1
21+
# # with:
22+
# # node-version: '12.x'
2223

23-
- name: Security Audit
24-
run: npm audit --audit-level=moderate
24+
# - name: Security Audit
25+
# run: npm audit --audit-level=moderate
2526

2627
ci-test:
2728
name: Running unit tests
2829
runs-on: ubuntu-latest
2930
timeout-minutes: 90
3031
steps:
31-
- name: Clone and checkout branch
32-
uses: actions/checkout@master
32+
- name: Checkout
33+
uses: actions/checkout@v1
34+
# - name: Clone and checkout branch
35+
# uses: actions/checkout@master
3336

3437
- name: Set up Node.js version
3538
uses: actions/setup-node@v1
@@ -39,25 +42,31 @@ jobs:
3942
- name: Install dependencies
4043
run: npm install
4144

42-
- name: Inject Secrets
43-
shell: python
45+
# - name: Inject Secrets
46+
# shell: python
47+
# env:
48+
# SCOPES: ${{ secrets.scopes }}
49+
# CLIENT_ID: ${{ secrets.client_id }}
50+
# AUTHORITY: ${{ secrets.authority }}
51+
# BASE_PATH: "src/environments/"
52+
# run: |
53+
# import os
54+
# import json
55+
# data = {}
56+
# base_path = os.environ.get('BASE_PATH', 'src/environments/')
57+
# with open(base_path + "keys.example.json", "r+") as jsonFileRead:
58+
# data = json.load(jsonFileRead)
59+
# data["scopes"] = str(os.environ['SCOPES']).split(",")
60+
# data["client_id"] = os.environ['CLIENT_ID']
61+
# data["authority"] = os.environ['AUTHORITY']
62+
# with open(base_path + ".keys.json", "w+") as jsonFileWrite:
63+
# json.dump(data, jsonFileWrite)
64+
65+
# - name: Run the test
66+
# run: npm run ci-test --if-present
67+
68+
- name: Run Semantic-release
4469
env:
45-
SCOPES: ${{ secrets.scopes }}
46-
CLIENT_ID: ${{ secrets.client_id }}
47-
AUTHORITY: ${{ secrets.authority }}
48-
BASE_PATH: "src/environments/"
49-
run: |
50-
import os
51-
import json
52-
data = {}
53-
base_path = os.environ.get('BASE_PATH', 'src/environments/')
54-
with open(base_path + "keys.example.json", "r+") as jsonFileRead:
55-
data = json.load(jsonFileRead)
56-
data["scopes"] = str(os.environ['SCOPES']).split(",")
57-
data["client_id"] = os.environ['CLIENT_ID']
58-
data["authority"] = os.environ['AUTHORITY']
59-
with open(base_path + ".keys.json", "w+") as jsonFileWrite:
60-
json.dump(data, jsonFileWrite)
61-
62-
- name: Run the test
63-
run: npm run ci-test --if-present
70+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
71+
run: npx semantic-release
72+

0 commit comments

Comments
 (0)