Skip to content

Commit

Permalink
Disk cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Dec 3, 2024
1 parent 5661ef8 commit c2ae590
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/cleanup-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Disk cleanup test

on:
push:
branches:
- cleanup-tests

jobs:
cleanup:
name: Disk cleanup
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4

- name: Disk cleanup
shell: bash
run: |
echo "Disk space before cleanup:"
df -h
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /opt/ghc || true
echo "Disk space after cleanup:"
df -h
- name: Disk cleanup 2
shell: bash
run: |
echo "Disk space before cleanup 2:"
df -h
sudo rm -rf /usr/local/.ghcup || true
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
sudo rm -rf /usr/local/share/boost || true
sudo apt-get clean
tar -cf /mnt/test.tar /opt
ls -l /mnt
echo "Disk space after cleanup 2:"
df -h

0 comments on commit c2ae590

Please sign in to comment.