Skip to content

Commit

Permalink
fix: Added Step to cleanup disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion committed Aug 16, 2024
1 parent 4708f15 commit 1cfc04e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/cicd-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ on:
required: false
type: boolean
default: false
enableCleanUp:
required: false
type: boolean
default: false
runs-on-build:
required: false
type: string
Expand Down Expand Up @@ -105,6 +109,7 @@ jobs:
uses: ./.github/workflows/step-dotnet-tests.yml
with:
enableSonarQube: ${{ inputs.enableSonarQube || false }}
enableCleanUp: ${{ inputs.enableCleanUp || false }}
disableCoverageUpload: ${{ inputs.disableCoverageUpload || false }}
dotnet-logging: ${{ inputs.dotnet-logging || 'quiet' }}
dotnet-version: ${{ inputs.dotnet-version || '8.x' }}
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/step-dotnet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
required: false
type: boolean
default: false
enableCleanUp:
required: false
type: boolean
default: false
disableCoverageUpload:
required: false
type: boolean
Expand Down Expand Up @@ -64,6 +68,24 @@ jobs:
dotnet-version: ${{ inputs.dotnet-version }}
dotnet-quality: ${{ inputs.dotnet-quality }}

# Our modules occupy too much disk space. The GitHub-hosted runners ran into the
# error: "no space left on device." The pulled images are not cleaned up between
# the test runs. One obvious approach is splitting the tests and running them on
# multiple runners. However, we need to keep in mind that running too many
# simultaneous builds has an impact on others as well. We observed that scheduled
# Dependabot builds blocked others in the Testcontainers organization.
- name: Free Disk Space
uses: jlumbroso/free-disk-space@v1.3.1
if: ${{ inputs.enableCleanUp == true && runner.os == 'Linux' }}
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Setup JDK 17
if: ${{ inputs.enableSonarQube == true }}
uses: actions/setup-java@v4
Expand Down Expand Up @@ -96,7 +118,6 @@ jobs:
run: |
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnet-logging }} --no-build --no-restore --collect:"XPlat Code Coverage" /p:GeneratePackageOnBuild=false -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Stop SonarQube Analysis
if: ${{ inputs.enableSonarQube == true && (success() || steps.test.conclusion == 'failure') }}
id: sonar
Expand Down

0 comments on commit 1cfc04e

Please sign in to comment.