Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e3b0e46
Enhance CI/CD workflows by adding comprehensive testing steps and adj…
NadeemJazmawe Feb 10, 2025
cfc778e
Refactor CI workflow to reintroduce caching for static site content a…
NadeemJazmawe Feb 10, 2025
a5abbdd
Merge branch 'master' into Unit_Build_Test_Jobs
Maheshkale447 Feb 27, 2025
dda71fd
Merge branch 'master' into Unit_Build_Test_Jobs
Maheshkale447 Mar 3, 2025
8a59d85
Merge branch 'master' into Unit_Build_Test_Jobs
Maheshkale447 Mar 11, 2025
617962f
Merge branch 'master' into Unit_Build_Test_Jobs
Maheshkale447 Apr 24, 2025
b52fdf7
Merge pull request #4241 from Ginger-Automation/master
NadeemJazmawe Jun 22, 2025
077e221
Rename build job to "Build & Test" in CI, CD, and Build workflows
NadeemJazmawe Jun 22, 2025
2943f18
Enhance caching in workflows by adding Windows support and improving …
NadeemJazmawe Jul 6, 2025
bbde29c
Add support for manual workflow dispatch in caching for all OS enviro…
NadeemJazmawe Jul 6, 2025
ea7b0bf
Update caching condition in Build workflow to include non-push events
NadeemJazmawe Jul 6, 2025
07616d9
Update caching condition for Windows to trigger only on manual workfl…
NadeemJazmawe Jul 6, 2025
c8c653a
Update cache path in Build workflow to target specific Linux runtime …
NadeemJazmawe Jul 6, 2025
b69d247
Add new Build_old workflow for legacy support across multiple OS envi…
NadeemJazmawe Jul 6, 2025
6413b65
Add Builder_old job to CI workflow for legacy build support
NadeemJazmawe Jul 6, 2025
3fefd37
Remove Builder_old job from CI workflow to streamline configuration
NadeemJazmawe Jul 6, 2025
87c703c
No code changes made; skipping commit.
NadeemJazmawe Jul 6, 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
103 changes: 92 additions & 11 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Solution
name: Build & Test

on:
workflow_call:
Expand Down Expand Up @@ -140,12 +140,96 @@ jobs:
- name: 'Publish GingerRuntime - macOS'
if: runner.os == 'macOS'
run: dotnet publish ./Ginger/GingerRuntime/GingerRuntime.csproj --runtime osx-x64 --self-contained true -c Release

# ------------------------------------------------------------------------------------------------------
# Install msbild && Build Ginger Solution
# ------------------------------------------------------------------------------------------------------
- name: Add msbuild to PATH
if: ${{github.workflow == 'Ginger Windows Test'}}
uses: microsoft/setup-msbuild@v1.0.2

# ------------------------------------------------------------------------------------------------------
# Start Testing
# ------------------------------------------------------------------------------------------------------
- name: 'Testing GingerUtilsTest'
if: success() || failure()
run: dotnet test Ginger/GingerUtilsTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

- name: 'Testing GingerCoreCommonTest'
if: success() || failure()
run: dotnet test Ginger/GingerCoreCommonTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

- name: 'Testing GingerCoreNETUnitTest'
if: success() || failure()
run: dotnet test Ginger/GingerCoreNETUnitTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

- name: 'Testing GingerPluginCoreTest'
if: success() || failure()
run: dotnet test Ginger/GingerPluginCoreTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

- name: 'Testing GingerConsoleTest'
if: success() || failure()
run: dotnet test Ginger/GingerConsoleTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

- name: 'Testing GingerAutoPilotTest'
if: success() || failure()
run: dotnet test Ginger/GingerAutoPilotTest --configuration ${{ env.BUILD_CONFIGURATION }} --logger trx --results-directory D:\a\TestResults --verbosity=normal

# ------------------------------------------------------------------------------------------------------
# Run .Net Framework tests using powershell and publish the results
# ------------------------------------------------------------------------------------------------------
- name: Run tests for Ginger .NetFramework *Test Dlls for Windows
if: (success() || failure()) && (runner.os == 'Windows') # run this step even if previous step failed and if the OS is Windows
run: powershell -file "TestDotNetFrameworkGithub.ps1"

# ------------------------------------------------------------------------------------------------------
# Run Standalone CLI Test
# ------------------------------------------------------------------------------------------------------
- name: Run Standalone CLI Test for Linux
if: (success() || failure()) && (runner.os == 'Linux') # run this step even if previous step failed
shell: bash
run: |
pwd
ls -alt
chmod +x CLITestsGithub.sh
sudo apt install dos2unix
dos2unix -b CLITestsGithub.sh
./CLITestsGithub.sh

# ------------------------------------------------------------------------------------------------------
# Publish Test Results
# ------------------------------------------------------------------------------------------------------
- name: Test Report - Windows
uses: dorny/test-reporter@v1
if: (success() || failure()) && (runner.os == 'Windows') # run this step even if previous step failed
with:
name: Generate Unit Test Report for Windows # Name of the check run which will be created
path: "D:/a/TestResults/*.trx" # Path to test results
reporter: dotnet-trx # Format of test results

- name: Test Report - Linux
uses: dorny/test-reporter@v1
if: (success() || failure()) && (runner.os == 'Linux') # run this step even if previous step failed
with:
name: Generate Unit Test Report for Linux # Name of the check run which will be created
path: "**/*.trx" # Path to test results
reporter: dotnet-trx # Format of test results

- name: Test Report - MacOS
uses: dorny/test-reporter@v1
if: (success() || failure()) && (runner.os == 'macOS') # run this step even if previous step failed
with:
name: Generate Unit Test Report for MacOS # Name of the check run which will be created
path: "**/*.trx" # Path to test results
reporter: dotnet-trx # Format of test results


# ------------------------------------------------------------------------------------------------------
# Upload Artifacts
# ------------------------------------------------------------------------------------------------------
- name: Cache static site content - Windows
id: cache_windows
if: runner.os == 'Windows'
if: runner.os == 'Windows' && github.event_name == 'workflow_dispatch'
uses: actions/cache@v4
with:
path:
Expand All @@ -157,26 +241,23 @@ jobs:

- name: Cache static site content - Linux
id: cache_linux
if: runner.os == 'Linux'
if: runner.os == 'Linux' || github.event_name == 'workflow_dispatch'
uses: actions/cache@v4
with:
path:
./**
key:
cache-site-linux-${{ github.run_number }}
enableCrossOsArchive:
true

cache-site-linux-${{github.run_number}}


- name: Cache static site content - macOS
id: cache_macos
if: runner.os == 'macOS'
if: runner.os == 'macOS' || github.event_name == 'workflow_dispatch'
uses: actions/cache@v4
with:
path:
./**
key:
cache-site-macos-${{ github.run_number }}
cache-site-macos-${{github.run_number}}
enableCrossOsArchive:
true

true
16 changes: 8 additions & 8 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ on:
- 'No' # Do not add SSL certificate
jobs:
Builder:
name: Build Solution
name: Build & Test
uses: ./.github/workflows/Build.yml
secrets: inherit

Ginger_Unit-Test:
name: Execute Unit Tests
needs: Builder
uses: ./.github/workflows/Test.yml
secrets: inherit
# Ginger_Unit-Test:
# name: Execute Unit Tests
# needs: Builder
# uses: ./.github/workflows/Test.yml
# secrets: inherit

Release:
name: Release
needs: Ginger_Unit-Test
needs: Builder
uses: ./.github/workflows/Release.yml
secrets: inherit

Expand All @@ -57,6 +57,6 @@ jobs:

Docker:
name: Docker
needs: Ginger_Unit-Test
needs: Builder
uses: ./.github/workflows/Docker.yml
secrets: inherit
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ on:

jobs:
Builder:
name: Build Solution
name: Build & Test
uses: ./.github/workflows/Build.yml
secrets: inherit

Ginger_Unit-Test:
name: Execute Unit Tests
needs: Builder
uses: ./.github/workflows/Test.yml
secrets: inherit
# Ginger_Unit-Test:
# name: Execute Unit Tests
# needs: Builder
# uses: ./.github/workflows/Test.yml
# secrets: inherit



25 changes: 23 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ jobs:
enableCrossOsArchive:
true

- name: Restore static site content - windows
uses: actions/cache@v4
with:
path: ./**
key: cache-site-windows-${{github.run_number}}
enableCrossOsArchive:
true
- name: Print folder content
run: ls -al

- name: Create Directory for Ginger macOS Runtime
run: |
mkdir Runtime
Expand Down Expand Up @@ -61,10 +71,21 @@ jobs:
uses: actions/cache@v4
with:
path: ./**
key: cache-site-linux-${{ github.run_number }}
key: cache-site-linux-${{github.run_number}}
enableCrossOsArchive:
true

- name: Restore static site content - windows
uses: actions/cache@v4
with:
path: ./**
key: cache-site-windows-${{github.run_number}}
enableCrossOsArchive:
true

- name: Print folder content
run: ls -al

- name: Create Directory for GingerRuntime
run: |
mkdir Runtime
Expand Down Expand Up @@ -119,7 +140,7 @@ jobs:
uses: actions/cache@v4
with:
path: ./**
key: cache-site-windows-${{ github.run_number }}
key: cache-site-windows-${{github.run_number}}
enableCrossOsArchive:
true

Expand Down
Loading