11name : CI process for time-tracker app
22
33on :
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
910jobs :
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