Skip to content

Commit 3280be0

Browse files
authored
Merge pull request #1 from dotnetprog/feature/AddCICD
init ci-validation
2 parents b0a0fca + 545e52d commit 3280be0

File tree

7 files changed

+1269
-10
lines changed

7 files changed

+1269
-10
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI - Validation
2+
permissions:
3+
contents: read
4+
issues: read
5+
checks: write
6+
pull-requests: write
7+
on:
8+
pull_request:
9+
branches: [ "main" ]
10+
env:
11+
pcfWorkkingDirectory: 'src/broadcast-pcf/appmodulepicker'
12+
broadcastjsWorkingDirectory: 'src/broadcast-typescript'
13+
artifactlocation: '${{ github.workspace }}/dist'
14+
jobs:
15+
buildBroadCastJs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install dependencies
20+
run: npm ci
21+
working-directory: ${{ env.broadcastjsWorkingDirectory }}
22+
- name: build
23+
run: npm run build
24+
working-directory: ${{ env.broadcastjsWorkingDirectory }}
25+
- name: Run tests
26+
run: npm run test:ci
27+
working-directory: ${{ env.broadcastjsWorkingDirectory }}
28+
- name: Publish Test Report
29+
uses: phoenix-actions/test-reporting@v8
30+
id: test-report # Set ID reference for step
31+
if: ${{ (success() || failure()) && (github.event_name == 'pull_request') }} # run this step even if previous step failed
32+
with:
33+
name: JEST Tests # Name of the check run which will be created
34+
path: ${{ env.broadcastjsWorkingDirectory }}/*-junit.xml # Path to test results
35+
reporter: jest-junit # Format of test results
36+
37+
- name: Create destination folder
38+
run: mkdir -p ${{env.artifactlocation}}
39+
- name: Copy file outputjs into staging directory
40+
run: cp ${{ env.broadcastjsWorkingDirectory }}/dist/broadcast.js ${{env.artifactlocation}}
41+
- name: Upload broadcastjs artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: broadcastjs
45+
path: ${{env.artifactlocation}}
46+
buildAppModulePickerPCF:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Install dependencies
51+
run: npm ci
52+
working-directory: ${{ env.pcfWorkkingDirectory }}
53+
- name: build
54+
run: npm run build
55+
working-directory: ${{ env.pcfWorkkingDirectory }}
56+
- name: Create destination folder
57+
run: mkdir -p ${{env.artifactlocation}}
58+
- name: Copy file output pcf bundle into staging directory
59+
run: cp ${{ env.pcfWorkkingDirectory }}/out/controls/AppModulePicker/* ${{env.artifactlocation}}
60+
- name: Upload AppModulePicker artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: AppModulePicker
64+
path: ${{env.artifactlocation}}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lerna-debug.log*
88

99
# Diagnostic reports (https://nodejs.org/api/report.html)
1010
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
11+
vitest-junit.xml
1212
# Runtime data
1313
pids
1414
*.pid

GitVersion.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
next-version: 1.0.0
2+
assembly-versioning-scheme: MajorMinorPatch
3+
assembly-file-versioning-scheme: MajorMinorPatch
4+
tag-prefix: '[vV]?'
5+
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
6+
major-version-bump-message: \+semver:\s?(breaking|major)
7+
minor-version-bump-message: \+semver:\s?(feature|minor)
8+
patch-version-bump-message: \+semver:\s?(fix|patch)
9+
no-bump-message: \+semver:\s?(none|skip)
10+
tag-pre-release-weight: 60000
11+
commit-date-format: yyyy-MM-dd
12+
merge-message-formats: {}
13+
update-build-number: true
14+
semantic-version-format: Strict
15+
strategies:
16+
- ConfiguredNextVersion
17+
- Mainline
18+
branches:
19+
main:
20+
mode: ContinuousDeployment
21+
label: ''
22+
increment: Patch
23+
prevent-increment:
24+
of-merged-branch: true
25+
track-merge-target: false
26+
track-merge-message: true
27+
regex: ^master$|^main$
28+
source-branches: []
29+
is-source-branch-for: []
30+
tracks-release-branches: false
31+
is-release-branch: false
32+
is-main-branch: true
33+
pre-release-weight: 55000
34+
feature:
35+
mode: ContinuousDelivery
36+
label: '{BranchName}'
37+
increment: Patch
38+
prevent-increment:
39+
when-current-commit-tagged: false
40+
track-merge-message: true
41+
regex: ^features?[\/-](?<BranchName>.+)
42+
source-branches:
43+
- main
44+
is-source-branch-for: []
45+
is-main-branch: false
46+
pre-release-weight: 30000
47+
hotfix:
48+
mode: ContinuousDelivery
49+
label: '{BranchName}'
50+
increment: Patch
51+
prevent-increment:
52+
when-current-commit-tagged: false
53+
regex: ^hotfix(es)?[\/-](?<BranchName>.+)
54+
source-branches:
55+
- main
56+
is-source-branch-for: []
57+
is-release-branch: true
58+
is-main-branch: false
59+
pre-release-weight: 30000
60+
pull-request:
61+
mode: ContinuousDelivery
62+
label: PullRequest{Number}
63+
increment: Inherit
64+
prevent-increment:
65+
of-merged-branch: true
66+
when-current-commit-tagged: false
67+
track-merge-message: true
68+
regex: ^(pull-requests|pull|pr)[\/-](?<Number>\d*)
69+
source-branches:
70+
- main
71+
- feature
72+
- hotfix
73+
is-source-branch-for: []
74+
pre-release-weight: 30000
75+
unknown:
76+
increment: Patch
77+
prevent-increment:
78+
when-current-commit-tagged: false
79+
regex: (?<BranchName>.+)
80+
source-branches:
81+
- main
82+
is-source-branch-for: []
83+
pre-release-weight: 30000
84+
mode: ContinuousDelivery
85+
label: '{BranchName}'
86+
increment: Inherit
87+
prevent-increment:
88+
of-merged-branch: false
89+
when-branch-merged: false
90+
when-current-commit-tagged: true
91+
track-merge-target: false
92+
track-merge-message: true
93+
commit-message-incrementing: Enabled
94+
regex: ''
95+
source-branches: []
96+
is-source-branch-for: []
97+
tracks-release-branches: false
98+
is-release-branch: false
99+
is-main-branch: false

0 commit comments

Comments
 (0)