Skip to content

⬆️ Actions: Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4… #315

⬆️ Actions: Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4…

⬆️ Actions: Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4… #315

name: Build and test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --no-restore --configuration Release --logger "junit;LogFilePath=test-result.xml"
- name: Publish
run: dotnet publish src/WebApi/WebApi.csproj --no-build --no-restore --configuration Release --output ./publish
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: published-files
path: ./publish
- name: Test Report
uses: test-summary/action@v2
if: success() || failure()
with:
paths: ./**/test-result.xml
output: test-summary.md
- name: Output job summary
if: success() || failure()
run: |
cat test-summary.md >> $GITHUB_STEP_SUMMARY