Skip to content

OHID-523 Re-order license class part2 #7175

OHID-523 Re-order license class part2

OHID-523 Re-order license class part2 #7175

Workflow file for this run

name: UnitTest-Checks
on:
pull_request:
types: [opened, reopened, synchronize, closed]
branches-ignore:
- 'test'
- 'master'
workflow_dispatch:
jobs:
test-frontend:
defaults:
run:
working-directory: ./prime-angular-frontend
if: github.ref != 'develop' || (github.ref == 'develop' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v6
- name: set-date
run: |
echo "GIT_COMMITTED_AT=$(date +%s)" >> ${GITHUB_ENV}
# - name: Cache node modules.
# uses: actions/cache@v6
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/prime-angular-frontend/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: prime-angular-frontend/yarn.lock
- name: install yarn
run: npm install -g yarn
- name: yarn and yarn run test
run: |
yarn
yarn run test
test-backend:
defaults:
run:
working-directory: ./prime-dotnet-webapi-tests
if: github.ref != 'develop' || (github.ref == 'develop' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.0']
steps:
- uses: actions/checkout@v6
- name: set-date
run: |
echo "GIT_COMMITTED_AT=$(date +%s)" >> ${GITHUB_ENV}
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v1
with:
# Semantic version range syntax or exact version of a dotnet version
dotnet-version: '8.0'
- name: Install dependencies
run: |
cd ../
dotnet restore
- name: Install ReportGenerator
run: |
cd ../
dotnet tool install -g dotnet-reportgenerator-globaltool --version 5.3.6
- name: Generate coverage report
env:
EXCLUDE: "**/Migrations/**%2c**/Models/**%2c**/Views/**%2c**/ViewModels/**%2c**/Configuration/**%2c**/DTOs/**%2c**/Helpers/**%2c**/Resources/**%2c**/**Definitions.cs"
run: |
dotnet test /p:ExcludeByFile=$EXCLUDE /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude=[xunit.*]* --filter FullyQualifiedName\!~Integration
- name: Run report generator
run: |
reportgenerator "-reports:coverage.cobertura.xml" "-targetdir:coverage" -reporttype:lcov "-filefilters:-ApiDbContextModelSnapshot.cs;" -verbosity:Error