Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run unit tests in pipeline #102

Merged
merged 50 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0003768
Add run unit tests in pipeline
Feb 27, 2025
abe926f
Add unit test execution in publish
Feb 27, 2025
a9c3395
test
Feb 27, 2025
a3affd8
test
Feb 27, 2025
1eda390
remove unecessary build line
Feb 27, 2025
126789b
test
Feb 27, 2025
c7dee87
test
Feb 27, 2025
2dc4457
test2
Feb 27, 2025
cc70f11
Fix
Feb 27, 2025
603ba48
test
Feb 27, 2025
bccb9c8
Fix
Feb 27, 2025
c906204
Fix
Feb 27, 2025
b26181a
test
Feb 27, 2025
860b171
Line converage
Feb 27, 2025
c90ffff
Test
Feb 27, 2025
12f057a
fix
Feb 27, 2025
e842b3b
Finalize pull request
Feb 27, 2025
50dc5c5
Fix branch name
Feb 27, 2025
1dc0189
Fix
Feb 27, 2025
d2dac50
Fix readme
Feb 27, 2025
4722a24
Fix
Feb 27, 2025
86a0eee
Fix
Feb 27, 2025
bd85394
More enhancements
Feb 27, 2025
1146041
re-add publish to build
Feb 27, 2025
c6bdf35
Refactor build
Feb 27, 2025
3cb9982
Clear test results.
Feb 27, 2025
c5f2f4b
Re-add run unit tests in publish
Feb 27, 2025
3b7b0f2
don't run some steps in pr
Feb 27, 2025
f6bdb2d
Test
Feb 27, 2025
e424884
Not necessary to collect result here
Feb 27, 2025
1b4d474
Test
Feb 27, 2025
b7a5c34
test
Feb 27, 2025
a34d8b3
test
Feb 27, 2025
d562511
test
Feb 27, 2025
a85e2bd
test
Feb 27, 2025
da75a3c
test
Feb 27, 2025
4b84334
Last fix
Feb 27, 2025
351b31a
gonna test later
Feb 27, 2025
9399d89
Fix
Feb 27, 2025
60c6bf8
test
Feb 27, 2025
05a42c1
test
Feb 27, 2025
fb7978e
test
Feb 27, 2025
e327e12
Fix
Feb 27, 2025
f4019d7
test
Feb 27, 2025
5ef3939
fix
Feb 27, 2025
8957761
test
Feb 27, 2025
8a7d3af
test
Feb 27, 2025
f504eb1
Fix
Feb 27, 2025
f91e6be
fix
Feb 27, 2025
3063ba0
Fix
Feb 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,41 +63,45 @@ jobs:
path: code-coverage-results.md
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

- name: Log GitHub Reference
run: |
echo "GitHub ref: ${{ github.ref }}"
echo "GitHub head ref: ${{ github.head_ref }}"
echo "GitHub base ref: ${{ github.base_ref }}"
# Run build
- name: Build Windows
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: dotnet publish --no-build --no-restore --configuration Release --self-contained --runtime win-x64 Cmf.CustomerPortal.Sdk.sln
run: dotnet publish --configuration Release --self-contained --runtime win-x64 Cmf.CustomerPortal.Sdk.sln
- name: Build Linux
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: dotnet publish --no-build --no-restore --configuration Release --self-contained --runtime linux-x64 Cmf.CustomerPortal.Sdk.sln
run: dotnet publish --configuration Release --self-contained --runtime linux-x64 Cmf.CustomerPortal.Sdk.sln
# Read version
- name: Read tool version
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
uses: QwerMike/xpath-action@v1
id: getver
with:
filename: src/Version.props
expression: '/Project/PropertyGroup/Version/text()'
# Archive
- name: Archive Console Win64
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
uses: actions/upload-artifact@v4
with:
name: Cmf.CustomerPortal.Sdk.Console-${{ steps.getver.outputs.result }}.win-x64
path: src/Console/bin/Release/net8.0/win-x64/publish/
- name: Archive Console Linux64
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
uses: actions/upload-artifact@v4
with:
name: Cmf.CustomerPortal.Sdk.Console-${{ steps.getver.outputs.result }}.linux-x64
path: src/Console/bin/Release/net8.0/linux-x64/publish/
- name: Archive PowerShell
if: github.ref == 'refs/heads/main'
if: github.ref == 'main'
uses: actions/upload-artifact@v4
with:
name: Cmf.CustomerPortal.Sdk.PowerShell-${{ steps.getver.outputs.result }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
- name: Run Unit Tests
run: dotnet test Cmf.CustomerPortal.Sdk.sln --no-build --no-restore --configuration Release
# Run build
# Run build
- name: Build Windows
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: dotnet publish --no-build --no-restore --configuration Release --self-contained --runtime win-x64 Cmf.CustomerPortal.Sdk.sln
run: dotnet publish --configuration Release --self-contained --runtime win-x64 Cmf.CustomerPortal.Sdk.sln
- name: Build Linux
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: dotnet publish --no-build --no-restore --configuration Release --self-contained --runtime linux-x64 Cmf.CustomerPortal.Sdk.sln
run: dotnet publish --configuration Release --self-contained --runtime linux-x64 Cmf.CustomerPortal.Sdk.sln
# Read version
- name: Read tool version
uses: QwerMike/xpath-action@v1
Expand Down