-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combined build and test since with need to build before testing
- Loading branch information
1 parent
1e6dc3f
commit fc049a9
Showing
3 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: .Build and Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
name: .Build the entire solution | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 9.0.x | ||
|
||
- name: Restore .NET dependencies | ||
working-directory: ./src | ||
run: dotnet restore | ||
|
||
- name: Build | ||
working-directory: ./src | ||
run: dotnet build --no-restore | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: buildArtifact | ||
path: ./src | ||
retention-days: 7 | ||
|
||
tests: | ||
name: .Run Unit Tests | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 9.0.x | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: buildArtifact | ||
path: ./src | ||
|
||
- name: Test | ||
working-directory: ./src/NodeDev.Tests | ||
run: dotnet test --no-build --verbosity normal | ||
|
||
e2e-tests: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 9.0.x | ||
|
||
- uses: actions/download-artifact@master | ||
with: | ||
name: buildArtifact | ||
path: ./src | ||
|
||
- name: Build Necessary for Playwright | ||
working-directory: ./src/NodeDev.EndToEndTests | ||
run: dotnet build | ||
|
||
- name: Allow run | ||
run: chmod -R +x ./src/NodeDev.Blazor.Server/bin | ||
|
||
- name: Ensure browsers are installed | ||
run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps | ||
|
||
- name: Test | ||
env: | ||
HEADLESS: true | ||
working-directory: ./src/NodeDev.EndToEndTests | ||
run: dotnet test --no-build --verbosity normal | ||
|
||
- name: Upload std Artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logServer | ||
path: ./src/NodeDev.Blazor.Server/logs | ||
retention-days: 7 |