Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila committed Jul 2, 2024
1 parent 2cbd2b2 commit b2bd88b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ jobs:
path: src/FrameworkTests/MonoConsole/bin/${{ github.event_name != 'workflow_dispatch' && 'Debug' || inputs.build_configuration }}
if-no-files-found: error
retention-days: 1
- name: Publish test project AotConsole
uses: actions/upload-artifact@main
if: success() && (github.event_name != 'workflow_dispatch' && true || inputs.run_tests) == true
with:
name: AotConsole
path: src/FrameworkTests/AotConsole/bin/${{ github.event_name != 'workflow_dispatch' && 'Debug' || inputs.build_configuration }}
if-no-files-found: error
retention-days: 1
test:
name: Test (${{ matrix.os }})
needs: build
Expand Down Expand Up @@ -232,7 +240,7 @@ jobs:
if-no-files-found: error
retention-days: 1
docker:
name: Test (docker ${{ matrix.os }})
name: Test (${{ matrix.os }}; docker)
needs: build
strategy:
fail-fast: false
Expand All @@ -246,6 +254,7 @@ jobs:
with:
fetch-depth: 0
sparse-checkout: |
src/FrameworkTests/AotConsole/Dockerfiles
src/Tests/Dockerfiles
- name: Download test assemblies
if: success() || failure()
Expand All @@ -255,7 +264,7 @@ jobs:
- name: docker build
run: docker build -t test-client -f src/Tests/Dockerfiles/Dockerfile .
- name: docker run
run: docker run --rm --mount type=bind,source=.,target=/app/TestResults -t test-client
run: docker run --rm --mount type=bind,source=${{ github.workspace }}/TestResults,target=/app/TestResults -t test-client
- name: Upload test results
if: success() || failure()
uses: actions/upload-artifact@main
Expand All @@ -264,6 +273,16 @@ jobs:
path: ./**/*.trx
if-no-files-found: error
retention-days: 1
- name: Download test project AotConsole
if: success() || failure()
uses: actions/download-artifact@main
with:
name: AotConsole
path: AotConsole
- name: docker build
run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/Dockerfile .
- name: docker run
run: docker run --rm -t aotconsole
publish-test-results:
name: Publish tests results
needs: test
Expand Down
5 changes: 5 additions & 0 deletions src/FrameworkTests/AotConsole/Dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0
USER app
WORKDIR /app
COPY ["AotConsole", "."]
ENTRYPOINT ["dotnet", "net8.0/PDFtoImage.FrameworkTests.AotConsole.dll"]

0 comments on commit b2bd88b

Please sign in to comment.