Skip to content

Commit

Permalink
CI: add caching, enable AOT testing, and switch from vstest to dotnet…
Browse files Browse the repository at this point in the history
… test, apparently it works with ancient
  • Loading branch information
lilith committed Jan 29, 2024
1 parent cc249da commit ee3d79c
Showing 1 changed file with 18 additions and 60 deletions.
78 changes: 18 additions & 60 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
include:
- os: macos-11.0
- os: ubuntu-latest
test-aot: false
test-aot: true
- os: windows-latest
pack: true
docs: true
Expand All @@ -25,6 +25,14 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.os == 'windows-latest'
if: matrix.coverage
with:
files:
token: ${{ secrets.CODECOV_TOKEN }} # replace with your Codecov token
Expand Down Expand Up @@ -118,66 +126,16 @@ jobs:
nuget restore tests/Imageflow.TestDotNetFullPackageReference/Imageflow.TestDotNetFullPackageReference.csproj -SolutionDirectory src
msbuild src/Imageflow.dnfull.sln /p:Configuration=Release /p:Platform="Any CPU"
- name: Legacy - Test Imageflow.TestDotNetFull(Any CPU)
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFull.dll
searchFolder: ./tests/Imageflow.TestDotNetFull/bin/Release/
runInParallel: true
platform: Any CPU


- name: Legacy - Test Imageflow.TestDotNetFull(Any CPU)
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFullPackageReference.dll
searchFolder: ./tests/Imageflow.TestDotNetFullPackageReference/bin/Release/
runInParallel: true
platform: Any CPU


- name: Legacy - Test Imageflow.TestDotNetFull(x86)
- name: Legacy - Test Imageflow.TestDotNetFull and Imageflow.TestDotNetFullPackageReference
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFull.dll
searchFolder: ./tests/Imageflow.TestDotNetFull/bin/Release/
runInParallel: true
platform: x86


- name: Legacy - Test Imageflow.TestDotNetFullPackageReference(x86)
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFullPackageReference.dll
searchFolder: ./tests/Imageflow.TestDotNetFullPackageReference/bin/Release/
runInParallel: true
platform: x86


- name: Legacy - Test Imageflow.TestDotNetFull(x64)
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFull.dll
searchFolder: ./tests/Imageflow.TestDotNetFull/bin/Release/
runInParallel: true
platform: x64

- name: Legacy - Test Imageflow.TestDotNetFullPackageReference(x64)
if: matrix.test-legacy
uses: microsoft/[email protected]
with:
testAssembly: Imageflow.TestDotNetFullPackageReference.dll
searchFolder: ./tests/Imageflow.TestDotNetFullPackageReference/bin/Release/
runInParallel: true
platform: x64
run: |
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll --platform:x86
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll --platform:x86
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll --platform:x64
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll --platform:x64


- name: Test use in an AOT web app
if: matrix.test-aot
run: ./tests/Imageflow.TestWebAOT/test.ps1
Expand Down

0 comments on commit ee3d79c

Please sign in to comment.