-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.57 KB
/
testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Free Disk Space (Ubuntu)
on:
push:
branches:
- main
paths-ignore:
- "*.md"
pull_request:
branches:
- main
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ShellCheck
run: sudo apt-get install shellcheck -y
- name: Run ShellCheck
run: shellcheck main.sh -o all -e SC2033,SC2032
free_disk_space:
needs: shellcheck
if: github.event_name == 'push'
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
one_command: [true, false]
runs-on: ${{ matrix.os }}
steps:
- name: Free Disk Space
uses: endersonmenezes/free-disk-space@main
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
remove_swap: true
remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
remove_packages_one_command: ${{ matrix.one_command }}
testing: false
- name: Show all packages by size
run: |
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
- name: Show free disk space
run: df -h
- name: Search on second
run: |
FOLDERS=(/etc /opt /home /var /usr)
for folder in "${FOLDERS[@]}"; do
echo "Folder: $folder"
sudo du -h --max-depth=2 $folder | sort -h
done