@@ -32,71 +32,24 @@ jobs:
3232 buildBroadCastJs :
3333 runs-on : ubuntu-latest
3434 steps :
35- - uses : actions/checkout@v4
36- - name : Install dependencies
37- run : npm ci
38- working-directory : ${{ env.broadcastjsWorkingDirectory }}
39- - name : build
40- run : npm run build
41- working-directory : ${{ env.broadcastjsWorkingDirectory }}
42- - name : Run tests
43- run : npm run test:ci
44- working-directory : ${{ env.broadcastjsWorkingDirectory }}
45- - name : Publish Test Report
46- uses : phoenix-actions/test-reporting@v8
47- id : test-report # Set ID reference for step
48- if : ${{ (success() || failure()) && (github.event_name == 'pull_request') }} # run this step even if previous step failed
49- with :
50- name : JEST Tests # Name of the check run which will be created
51- path : ${{ env.broadcastjsWorkingDirectory }}/*-junit.xml # Path to test results
52- reporter : jest-junit # Format of test results
53- - name : Publish Tests Results to CodeCov
54- uses : codecov/test-results-action@v1
55- with :
56- fail_ci_if_error : true # optional (default = false)
57- disable_search : true
58- files : ./${{ env.broadcastjsWorkingDirectory }}/vitest-junit.xml # optional
59- flags : broadcast # optional
60- name : broadcastjs-tests # optional
61- token : ${{ secrets.CODECOV_TOKEN }} # required
62- verbose : true # optional (default = false)
63- - name : Publish Coverage to CodeCov
64- uses : codecov/codecov-action@v5
65- with :
66- fail_ci_if_error : true # optional (default = false)
67- disable_search : true
68- files : ./${{ env.broadcastjsWorkingDirectory }}/coverage/lcov.info # optional
69- flags : broadcast # optional
70- name : broadcastjs-coverage # optional
71- token : ${{ secrets.CODECOV_TOKEN }}
72- verbose : true # optional (default = false)
73- - name : Create destination folder
74- run : mkdir -p ${{env.artifactlocation}}
75- - name : Copy file outputjs into staging directory
76- run : cp ${{ env.broadcastjsWorkingDirectory }}/dist/broadcast.js ${{env.artifactlocation}}
77- - name : Upload broadcastjs artifact
78- if : ${{ success() && (github.event_name == 'push') }}
79- uses : actions/upload-artifact@v4
80- with :
81- name : broadcastjs
82- path : ${{env.artifactlocation}}
35+ - uses : actions/checkout@v4
36+ - uses : ./github/workflows/templates/buildjs.yml
37+ with :
38+ projectdirectory : ${{ env.broadcastjsWorkingDirectory }}
39+ componentName : broadcastjs
40+ publishArtifact : false
41+ testCommand : ' test:ci'
42+ publishCodeCov : ${{github.event_name == 'pull_request'}}
43+ artifactlocation : ${{env.artifactlocation}}
44+ secrets :
45+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
46+
8347 buildAppModulePickerPCF :
8448 runs-on : ubuntu-latest
8549 steps :
8650 - uses : actions/checkout@v4
87- - name : Install dependencies
88- run : npm ci
89- working-directory : ${{ env.pcfWorkkingDirectory }}
90- - name : build
91- run : npm run build
92- working-directory : ${{ env.pcfWorkkingDirectory }}
93- - name : Create destination folder
94- run : mkdir -p ${{env.artifactlocation}}
95- - name : Copy file output pcf bundle into staging directory
96- run : cp ${{ env.pcfWorkkingDirectory }}/out/controls/AppModulePicker/* ${{env.artifactlocation}}
97- - name : Upload AppModulePicker artifact
98- if : ${{ success() && (github.event_name == 'push') }}
99- uses : actions/upload-artifact@v4
51+ - uses : ./.github/workflows/templates/buildpcf.yml
10052 with :
101- name : AppModulePicker
102- path : ${{env.artifactlocation}}
53+ pcfdirectory : ${{ env.pcfWorkkingDirectory }}
54+ publishArtifact : false
55+ componentName : AppModulePicker
0 commit comments