Skip to content
Closed
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
13 changes: 4 additions & 9 deletions .github/workflows/CD-time-tracker-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@ jobs:
BASE_PATH: "src/environments/"
run: |
import os
import json
data = {}
base_path = os.environ.get('BASE_PATH', 'src/environments/')
with open(base_path + "keys.example.json", "r+") as jsonFileRead:
data = json.load(jsonFileRead)
data["scopes"] = str(os.environ['SCOPES']).split(",")
data["client_id"] = os.environ['CLIENT_ID']
data["authority"] = os.environ['AUTHORITY']
with open(base_path + ".keys.json", "w+") as jsonFileWrite:
json.dump(data, jsonFileWrite)
with open(base_path + "keys.ts", "w") as fileWithKeys:
fileWithKeys.write('export const AUTHORITY = ') + str(os.environ['SCOPES']).split(",") + ';';
fileWithKeys.write('\nexport const CLIENT_ID = ' + os.environ['CLIENT_ID']) + ';';
fileWithKeys.write('\nexport const SCOPES = ' + os.environ['AUTHORITY']) + ';';

- name: 'run: npm install and build'
run: |
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/CI-mutation-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Running mutation tests

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

jobs:
configuring-stryker:
name: Running stryker
runs-on: ubuntu-latest
timeout-minutes: 360
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: Inject Secrets
shell: python
env:
SCOPES: ${{ secrets.scopes }}
CLIENT_ID: ${{ secrets.client_id }}
AUTHORITY: ${{ secrets.authority }}
BASE_PATH: "src/environments/"
run: |
import os
base_path = os.environ.get('BASE_PATH', 'src/environments/')
with open(base_path + "keys.ts", "w") as fileWithKeys:
fileWithKeys.write('export const SCOPES = ') + str(os.environ['SCOPES']).split(",") + ';';
fileWithKeys.write('\nexport const CLIENT_ID = ' + os.environ['CLIENT_ID']) + ';';
fileWithKeys.write('\nexport const AUTHORITY = ' + os.environ['AUTHORITY']) + ';';

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

- name: Installing stryker-cli
run: npm install -g stryker-cli

- name: Running stryker
run: stryker run
16 changes: 7 additions & 9 deletions .github/workflows/CI-time-tracker-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,14 @@ jobs:
BASE_PATH: "src/environments/"
run: |
import os
import json
data = {}
base_path = os.environ.get('BASE_PATH', 'src/environments/')
with open(base_path + "keys.example.json", "r+") as jsonFileRead:
data = json.load(jsonFileRead)
data["scopes"] = str(os.environ['SCOPES']).split(",")
data["client_id"] = os.environ['CLIENT_ID']
data["authority"] = os.environ['AUTHORITY']
with open(base_path + ".keys.json", "w+") as jsonFileWrite:
json.dump(data, jsonFileWrite)
with open(base_path + "keys.ts", "w") as fileWithKeys:
scopes = str(os.environ['SCOPES']).split(",")
client_id = os.environ['CLIENT_ID']
authority = os.environ['AUTHORITY']
fileWithKeys.write(f'export const SCOPES = {scopes};')
fileWithKeys.write(f'\nexport const CLIENT_ID = {client_id};')
fileWithKeys.write(f'\nexport const AUTHORITY = {authority};')

- name: Run the test
run: npm run ci-test --if-present
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# stryker temp files
.stryker-tmp
Loading