Skip to content

chore(deps): bump docker/build-push-action from 5 to 6 #28

chore(deps): bump docker/build-push-action from 5 to 6

chore(deps): bump docker/build-push-action from 5 to 6 #28

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
env:
DOTNET_VERSION: '10.0.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
artifact-name: linux
- os: windows-latest
artifact-name: windows
- os: macos-latest
artifact-name: macos
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Cache .nuke temp directory
uses: actions/cache@v5
with:
path: .nuke/temp
key: ${{ runner.os }}-nuke-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuke-
- name: Restore dependencies
run: dotnet restore PokManager.sln
- name: Build solution
run: dotnet build PokManager.sln --configuration Release --no-restore
- name: Run tests
run: dotnet test PokManager.sln --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage" --results-directory ./TestResults
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.artifact-name }}
path: TestResults/**/*.trx
retention-days: 30
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-${{ matrix.artifact-name }}
path: TestResults/**/coverage.cobertura.xml
retention-days: 30
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest'
with:
files: TestResults/**/coverage.cobertura.xml
flags: unittests
name: codecov-${{ matrix.artifact-name }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
build-summary:
name: Build Summary
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- name: Check build status
run: |
if [ "${{ needs.build.result }}" == "success" ]; then
echo "All builds succeeded!"
exit 0
else
echo "Some builds failed!"
exit 1
fi