Skip to content

Commit b293b83

Browse files
committed
Merge branch 'master' into stable
2 parents cff766f + 2bc2aee commit b293b83

File tree

15 files changed

+2832
-52
lines changed

15 files changed

+2832
-52
lines changed

.github/workflows/dotnet-core-master.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,48 @@ jobs:
4242
with:
4343
name: time-planning-container
4444
path: time-planning-container.tar
45+
angular-unit-test:
46+
runs-on: ubuntu-latest
47+
continue-on-error: true
48+
steps:
49+
- uses: actions/checkout@v3
50+
with:
51+
path: eform-angular-timeplanning-plugin
52+
- name: Extract branch name
53+
id: extract_branch
54+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
55+
- name: 'Preparing Frontend checkout'
56+
uses: actions/checkout@v3
57+
with:
58+
fetch-depth: 0
59+
repository: microting/eform-angular-frontend
60+
ref: ${{ steps.extract_branch.outputs.branch }}
61+
path: eform-angular-frontend
62+
- name: Use Node.js
63+
uses: actions/setup-node@v3
64+
with:
65+
node-version: 20
66+
- name: Copy dependencies
67+
run: |
68+
cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
69+
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
70+
- name: yarn install
71+
run: cd eform-angular-frontend/eform-client && yarn install
72+
- name: Run Angular unit tests
73+
run: |
74+
cd eform-angular-frontend/eform-client
75+
# Check if Jest is configured
76+
if [ ! -f "jest.config.js" ] && [ ! -f "jest.config.ts" ]; then
77+
echo "⚠️ Jest is not configured in the frontend repository."
78+
echo "Unit tests require Jest to be configured. Skipping unit tests."
79+
echo ""
80+
echo "To enable unit tests, ensure Jest is configured in the frontend repository."
81+
exit 0
82+
fi
83+
84+
# Run Jest tests for time-planning-pn plugin
85+
echo "Running Jest tests for time-planning-pn plugin..."
86+
npm test:unit -- --testPathPattern=time-planning-pn --coverage --collectCoverageFrom='src/app/plugins/modules/time-planning-pn/**/*.ts' --coveragePathIgnorePatterns='\.spec\.ts$'
4587
pn-test:
4688
needs: build
4789
runs-on: ubuntu-latest

.github/workflows/dotnet-core-pr.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,45 @@ jobs:
3939
with:
4040
name: time-planning-container
4141
path: time-planning-container.tar
42+
angular-unit-test:
43+
runs-on: ubuntu-latest
44+
continue-on-error: true
45+
steps:
46+
- uses: actions/checkout@v3
47+
with:
48+
path: eform-angular-timeplanning-plugin
49+
- name: 'Preparing Frontend checkout'
50+
uses: actions/checkout@v3
51+
with:
52+
fetch-depth: 0
53+
repository: microting/eform-angular-frontend
54+
ref: stable
55+
path: eform-angular-frontend
56+
- name: Use Node.js
57+
uses: actions/setup-node@v3
58+
with:
59+
node-version: 20
60+
- name: Copy dependencies
61+
run: |
62+
cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
63+
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
64+
- name: yarn install
65+
run: cd eform-angular-frontend/eform-client && yarn install
66+
- name: Run Angular unit tests
67+
run: |
68+
cd eform-angular-frontend/eform-client
69+
# Check if Jest is configured
70+
if [ ! -f "jest.config.js" ] && [ ! -f "jest.config.ts" ]; then
71+
echo "⚠️ Jest is not configured in the frontend repository."
72+
echo "Unit tests require Jest to be configured. Skipping unit tests."
73+
echo ""
74+
echo "To enable unit tests, ensure Jest is configured in the frontend repository."
75+
exit 0
76+
fi
77+
78+
# Run Jest tests for time-planning-pn plugin
79+
echo "Running Jest tests for time-planning-pn plugin..."
80+
npm test:unit -- --testPathPattern=time-planning-pn --coverage --collectCoverageFrom='src/app/plugins/modules/time-planning-pn/**/*.ts' --coveragePathIgnorePatterns='\.spec\.ts$'
4281
pn-test:
4382
needs: build
4483
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)