-
Notifications
You must be signed in to change notification settings - Fork 0
1661 lines (1659 loc) · 87.2 KB
/
dotnet-core-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: .NET Docker
on:
push:
tags:
- 'v*.*.*'
jobs:
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Build Docker image
id: build
run: cd eform-angular-frontend && docker build . -t microtingas/frontend-container:latest --build-arg GITVERSION=1.0.0 --build-arg SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}
shell: bash
- run: docker save microtingas/frontend-container:latest -o container.tar
- uses: actions/upload-artifact@v3
with:
name: container
path: container.tar
frontend-test:
needs: frontend-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c,d,e,f,g,h,i,j]
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- uses: actions/download-artifact@v3
with:
name: container
- run: docker load -i container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir /home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/errorShots
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15 seconds
run: sleep 15
- name: Get standard output
run: cat docker_run_log
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: testheadless2${{matrix.test}}
run: cd eform-angular-frontend/eform-client && npm run testheadless2${{matrix.test}}
- name: ${{matrix.test}} test
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/${{matrix.test}}/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
- name: Notify slack fail
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: CC04FGH5K
status: ${{matrix.test}} FAILED
color: danger
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/errorShots/chrome*.png
retention-days: 2
frontend-test-dotnet:
needs: frontend-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Install dependencies
run: dotnet restore eform-angular-frontend/eFormAPI/eFormAPI.sln
- name: Build
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-frontend/eFormAPI/eFormAPI.Web.Tests/eFormAPI.Web.Tests.csproj
- name: Integration Tests
run: dotnet test --no-restore -c Release -v n eform-angular-frontend/eFormAPI/eFormAPI.Web.Integration.Tests/eFormAPI.Web.Integration.Tests.csproj
items-planning-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
- name: Copy Dockerfile
run: cp eform-angular-items-planning-plugin/Dockerfile .
- name: Build Docker image
id: build
run: |
pwd
ls -lah
docker build . -t microtingas/frontend-container:latest --build-arg GITVERSION=1.0.0 --build-arg PLUGINVERSION=1.0.0
shell: bash
- run: docker save microtingas/frontend-container:latest -o items-planning-container.tar
- uses: actions/upload-artifact@v3
with:
name: items-planning-container
path: items-planning-container.tar
items-planning-test:
needs: items-planning-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c]
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: items-planning-container
- run: docker load -i items-planning-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Sleep 15
run: sleep 15
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Tests/items-planning-settings eform-angular-frontend/eform-client/e2e/Tests/items-planning-settings
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Tests/items-planning-general eform-angular-frontend/eform-client/e2e/Tests/items-planning-general
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Page\ objects/ItemsPlanning eform-angular-frontend/eform-client/e2e/Page\ objects/ItemsPlanning
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Assets eform-angular-frontend/eform-client/e2e
cp -av eform-angular-items-planning-plugin/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts
cp -av eform-angular-items-planning-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
#mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
#cp -av eform-angular-items-planning-plugin/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin2${{matrix.test}}
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
- name: Notify slack fail
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel_id: C017TF6Q46T
status: FAILED
color: danger
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots/*.png
retention-days: 2
items-planning-test-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15
run: sleep 15
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet build eform-angular-items-planning-plugin/eFormAPI/Plugins/ItemsPlanning.Pn/ItemsPlanning.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-items-planning-plugin/eFormAPI/Plugins/ItemsPlanning.Pn/ItemsPlanning.Pn.Test/ItemsPlanning.Pn.Test.csproj
greate-belt-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
../../eform-angular-greate-belt-plugin/testinginstallpn.sh
- name: Copy Dockerfile
run: cp eform-angular-greate-belt-plugin/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/greate-belt-container:latest -t microtingas/greate-belt-container:1.0.0 --build-arg GITVERSION=1.0.0 --build-arg PLUGINVERSION=1.0.0 --build-arg PLUGIN4VERSION=1.0.0
- name: Tag builds
run: |-
docker tag microtingas/greate-belt-container:latest microtingas/greate-belt-container:latest
- run: docker save microtingas/greate-belt-container:latest -o greate-belt-container.tar
- uses: actions/upload-artifact@v3
with:
name: greate-belt-container
path: greate-belt-container.tar
greate-belt-pn-test:
needs: greate-belt-pn-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- uses: actions/download-artifact@v3
with:
name: greate-belt-container
- run: docker load -i greate-belt-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/greate-belt-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15
run: sleep 15
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing ItemsPlanning checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
#cp -av eform-angular-greate-belt-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
#cp -av eform-angular-greate-belt-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
- name: Build frontend
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln > dotnet_log 2>&1 &
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: Get standard output
run: |
cat docker_run_log
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
#- name: Plugin testing
# run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: always()
run: |
cat docker_run_log
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
eform-angular-frontend/eform-client/errorShots/chrome*.png
retention-days: 2
greatebelt-dotnet-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Sleep 15 seconds
run: sleep 15
- name: Build
run: dotnet build eform-angular-greate-belt-plugin/eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-greate-belt-plugin/eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn.Test/GreateBelt.Pn.Test.csproj
workflow-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the work order version
id: get_frontend_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-angular-frontend && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Dockerfile
run: cp eform-angular-workflow-plugin/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/workflow-container:latest -t microtingas/workflow-container:1.0.0 --build-arg GITVERSION=1.00 --build-arg PLUGINVERSION=1.0.0
- run: docker save microtingas/workflow-container:latest -o workflow-container.tar
- uses: actions/upload-artifact@v3
with:
name: workflow-container
path: workflow-container.tar
workflow-test:
needs: workflow-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- uses: actions/download-artifact@v3
with:
name: workflow-container
- run: docker load -i workflow-container.tar
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Sleep 15 seconds
run: sleep 15
- name: Load DB dump
run: |
mysql -u root -h 127.0.0.1 --password=secretpassword -e 'create database `420_eform-angular-workflow-plugin`'
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/workflow-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15 seconds
run: sleep 15
- name: Get standard output
run: cat docker_run_log
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
workflow-dotnet-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Sleep 15 seconds
run: sleep 15
- name: Load DB dump
run: |
mysql -u root -h 127.0.0.1 --password=secretpassword -e 'create database `420_eform-angular-workflow-plugin`'
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Build
run: dotnet build eform-angular-workflow-plugin/eFormAPI/Plugins/Workflow.Pn/Workflow.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-workflow-plugin/eFormAPI/Plugins/Workflow.Pn/Workflow.Pn.Test/Workflow.Pn.Test.csproj
backend-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: 'Preparing backend configuration checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: 'Preparing time planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
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
cp -av eform-backendconfiguration-plugin/eform-client/src/app/plugins/modules/backend-configuration-pn eform-angular-frontend/eform-client/src/app/plugins/modules/backend-configuration-pn
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
../../eform-angular-timeplanning-plugin/testinginstallpn.sh
../../eform-backendconfiguration-plugin/testinginstallpn.sh
../../eform-angular-workflow-plugin/testinginstallpn.sh
../../eform-angular-greate-belt-plugin/testinginstallpn.sh
- name: Check nuget package versions
run: |
python3 main/extract_packages.py
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-angular-items-planning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the work flow version
id: get_plugin3_version
run: echo ::set-output name=PLUGIN3VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the backend configuration version
id: get_plugin4_version
run: echo ::set-output name=PLUGIN4VERSION::$(cd eform-backendconfiguration-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the time planning version
id: get_plugin5_version
run: echo ::set-output name=PLUGIN5VERSION::$(cd eform-angular-timeplanning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the greate belt version
id: get_plugin6_version
run: echo ::set-output name=PLUGIN6VERSION::$(cd eform-angular-greate-belt-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the frontend version
id: get_frontend_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-angular-frontend && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy frontendfiles
run: cp main/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-container:latest -t microtingas/work-items-planning-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_frontend_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN2VERSION=${{ steps.get_plugin_version.outputs.PLUGIN2VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }} --build-arg PLUGIN6VERSION=${{ steps.get_plugin6_version.outputs.PLUGIN6VERSION }} --build-arg SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-container:latest microtingas/work-items-planning-container:latest
- run: docker save microtingas/work-items-planning-container:latest -o work-items-planning-container.tar
- uses: actions/upload-artifact@v3
with:
name: work-items-planning-container
path: work-items-planning-container.tar
backend-pn-test:
needs: backend-pn-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c,d,e,f,g,h,i,j]
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: work-items-planning-container
- run: docker load -i work-items-planning-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/work-items-planning-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing bacend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: 'Preparing ItemsPlanning checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
#cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
#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
cp -av eform-backendconfiguration-plugin/eform-client/src/app/plugins/modules/backend-configuration-pn eform-angular-frontend/eform-client/src/app/plugins/modules/backend-configuration-pn
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Tests/backend-configuration-settings eform-angular-frontend/eform-client/e2e/Tests/backend-configuration-settings
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Tests/backend-configuration-general eform-angular-frontend/eform-client/e2e/Tests/backend-configuration-general
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Page\ objects/BackendConfiguration eform-angular-frontend/eform-client/e2e/Page\ objects/BackendConfiguration
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Assets eform-angular-frontend/eform-client/e2e/
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Page\ objects/ItemsPlanning eform-angular-frontend/eform-client/e2e/Page\ objects/ItemsPlanning
cp -av eform-backendconfiguration-plugin/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts
cp -av eform-backendconfiguration-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn
cp -av eform-backendconfiguration-plugin/eform-client/cypress/e2e/plugins/backend-configuration-pn eform-angular-frontend/eform-client/cypress/e2e/plugins
cp -av eform-backendconfiguration-plugin/eform-client/cypress/fixtures eform-angular-frontend/eform-client/cypress
#mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
#cp -av eform-angular-items-planning-plugin/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning
#cp -av eform-angular-timeplanning-plugin/eFormAPI/eFormAPI.Web/Plugins/TimePlanning.Pn eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/TimePlanning.Pn
#cp -av eform-backendconfiguration-plugin/eFormAPI/eFormAPI.Web/Plugins/BackendConfiguration.Pn eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/BackendConfiguration.Pn
#cd eform-angular-frontend/eform-client && ../../eform-backendconfiguration-plugin/testinginstallpn.sh
#../../eform-angular-items-planning-plugin/testinginstallpn.sh
#../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Build frontend
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln > dotnet_log 2>&1 &
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir /home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: Get standard output
run: |
cat docker_run_log
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Get standard output
run: |
cat docker_run_log
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin2${{matrix.test}}
- name: Load DB dump
if: matrix.test == 'a'
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_Angular.EformPlugins set Status = 2'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Restart the Docker container
if: matrix.test == 'a'
run: docker restart my-container
- name: Sleep 15
if: matrix.test == 'a'
run: sleep 15
- name: Get standard output
run: |
cat docker_run_log
- name: ${{matrix.test}} test
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/plugins/backend-configuration-pn/${{matrix.test}}/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: always()
run: |
cat docker_run_log
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots/chrome*.png
retention-days: 2
- name: Archive videos
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/cypress/videos/*.mp4
retention-days: 2
backend-pn-test-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing bacend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15
run: sleep 15
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet build eform-backendconfiguration-plugin/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-backendconfiguration-plugin/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj
timeplanning-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Preparing Time Planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Copy dependencies
run: |
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
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-settings eform-angular-frontend/eform-client/e2e/Tests/time-planning-settings
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-general eform-angular-frontend/eform-client/e2e/Tests/time-planning-general
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Page\ objects/TimePlanning eform-angular-frontend/eform-client/e2e/Page\ objects/TimePlanning
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-headless-plugin-step2a.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2a.conf.ts
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts