Skip to content

Commit

Permalink
Net8, Run tests and extract AppId from csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Jul 10, 2024
1 parent fbc0cbb commit 348360f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ezpipeline": {
"version": "0.0.44",
"version": "0.0.45",
"commands": [
"ezpipeline"
]
Expand Down
45 changes: 36 additions & 9 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -48,9 +48,33 @@ jobs:
ANDROID_VERSION: ${{ env.ANDROID_VERSION }}
HAS_PLAY_KEYSTORE: ${{ env.HAS_PLAY_KEYSTORE }}

# ---------------------------------------------------------------------------------------
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore

- name: Test in Debug configuration
working-directory: ./RbfxTemplate.Tests
run: dotnet test --configuration Debug --verbosity normal

- name: Test in Release configuration
working-directory: ./RbfxTemplate.Tests
run: dotnet test --configuration Release --verbosity normal

# ---------------------------------------------------------------------------------------
build_desktop:
needs: set_version
needs: set_version, tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -83,7 +107,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -126,10 +150,8 @@ jobs:
shell: bash
# ---------------------------------------------------------------------------------------
build_android:
needs: set_version
needs: set_version, tests
runs-on: ubuntu-latest
env:
ANDROID_PACKAGENAME: "com.companyname.RbfxTemplate.android"

steps:
- uses: actions/checkout@v3
Expand All @@ -140,7 +162,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -179,6 +201,11 @@ jobs:
fileName: 'googleplay.jks'
encodedString: ${{ secrets.PLAY_KEYSTORE }}

- name: Extract ApplicationId from RbfxTemplate.Android.csproj
working-directory: ./RbfxTemplate.Android
run: |
dotnet tool run ezpipeline get-msbuild-property -i RbfxTemplate.Android.csproj -p ApplicationId -v ANDROID_PACKAGENAME
- name: Dotnet Publish
working-directory: ./RbfxTemplate.Android
run: |
Expand Down Expand Up @@ -226,7 +253,7 @@ jobs:
track: internal
# ---------------------------------------------------------------------------------------
build_uwp:
needs: set_version
needs: set_version, tests
runs-on: windows-latest

steps:
Expand All @@ -238,7 +265,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add msbuild to PATH
uses: microsoft/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion RbfxTemplate.Tests/SampleUnitTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async Task TestMethod()
await Assert.ThrowsAsync<ArgumentException>(TestMethod);
}

[Fact]
[Fact(Skip = "This test demonstrates that async failing test handled properly")]
public async Task SampleFailingTest()
{
await RbfxTestFramework.ToMainThreadAsync();
Expand Down

0 comments on commit 348360f

Please sign in to comment.