Skip to content

Commit 49cfc77

Browse files
authored
Merge branch 'master' into 78-customers-administration-screen
2 parents 7d5d5e1 + fbcf2a3 commit 49cfc77

File tree

13 files changed

+1916
-37
lines changed

13 files changed

+1916
-37
lines changed

.github/workflows/CD-time-tracker-ui.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,11 @@ jobs:
2525
node-version: '12.x'
2626

2727
- name: Inject Secrets
28-
shell: python
2928
env:
3029
SCOPES: ${{ secrets.scopes }}
3130
CLIENT_ID: ${{ secrets.client_id }}
3231
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)
32+
run: sudo sh scripts/populate-keys.sh
4633

4734
- name: 'run: npm install and build'
4835
run: |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Running mutation tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1'
6+
7+
jobs:
8+
configuring-stryker:
9+
name: Running stryker
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 360
12+
steps:
13+
- name: Clone and checkout branch
14+
uses: actions/checkout@master
15+
16+
- name: Set up Node.js version
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '12.x'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Inject Secrets
25+
env:
26+
SCOPES: ${{ secrets.scopes }}
27+
CLIENT_ID: ${{ secrets.client_id }}
28+
AUTHORITY: ${{ secrets.authority }}
29+
run: sudo sh scripts/populate-keys.sh
30+
31+
- name: Run the test
32+
run: npm run ci-test --if-present
33+
34+
- name: Installing stryker-cli
35+
run: npm install -g stryker-cli
36+
37+
- name: Running stryker
38+
run: stryker run

.github/workflows/CI-time-tracker-ui.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,11 @@ jobs:
4040
run: npm install
4141

4242
- name: Inject Secrets
43-
shell: python
4443
env:
4544
SCOPES: ${{ secrets.scopes }}
4645
CLIENT_ID: ${{ secrets.client_id }}
4746
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)
47+
run: sudo sh scripts/populate-keys.sh
6148

6249
- name: Run the test
6350
run: npm run ci-test --if-present

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ yarn-error.log
4141
testem.log
4242
/typings
4343
.keys.json
44+
**keys.ts
45+
src/environments/keys.ts
46+
4447
# System Files
4548
.DS_Store
4649
Thumbs.db
50+
51+
# stryker temp files
52+
.stryker-tmp

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ The app will automatically reload if you change anything in the source files.
3434
## Prepare your environment
3535

3636
### Set environment variables
37-
Create file .keys.json from keys.example.ts into environments folder with the content pinned in our slack channel
37+
Create a file keys.ts with the content pinned in our slack channel:
38+
39+
```
40+
export const AUTHORITY = 'XXX';
41+
export const CLIENT_ID = 'XXX';
42+
export const SCOPES = ['XXX'];
43+
```
3844

3945
### Prepare your environment for vscode
4046
Install the following extensions:
@@ -56,6 +62,20 @@ Run `ng build` to build the project. The build artifacts will be stored in the `
5662

5763
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
5864

65+
## Running mutation tests
66+
Mutation tests have been enabled using stryker. You can run those tests locally, it takes ~4 hours to have the results. If you want to run them locally please install stryker locally:
67+
```
68+
npm install -g stryker-cli
69+
```
70+
71+
Now, run stryker:
72+
```
73+
stryker run
74+
```
75+
76+
Stryker is also executed on GitHub actions with the following cron expresion:
77+
78+
5979
## Running end-to-end tests
6080

6181
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

0 commit comments

Comments
 (0)