Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
DC-#125: Frontend reports und Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Lica200 committed Apr 29, 2024
1 parent 610800b commit 85d48a1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: backend

build_and_publish:
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Frontend workflow

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: Test frontend
defaults:
run:
working-directory: .\frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install requirements
run: npm install
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: frontend
21 changes: 21 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
coverage:
status:
project: off
patch: off

flag_management:
individual_flags:
- name: backend
paths:
- api/
statuses:
- type: project
target: auto #every new commit must maintain or raise overall coverage
threshold: 1%
- name: frontend
paths:
- web/
statuses:
- type: project
target: auto #every new commit must maintain or raise overall coverage
threshold: 1%
1 change: 1 addition & 0 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"polyfills": [
"zone.js",
"zone.js/testing"
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test --code-coverage"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit 85d48a1

Please sign in to comment.