-
Notifications
You must be signed in to change notification settings - Fork 0
220 lines (214 loc) · 7.65 KB
/
test_docker.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
name: test-docker
on:
pull_request:
branches:
- '**'
workflow_call:
inputs:
check-service-test:
required: false
default: false
type: boolean
jobs:
rspec:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
# - uses: docker/setup-buildx-action@v2
# - uses: docker/build-push-action@v4
# with:
# context: ${{ matrix.service }}/docker/cpu
# cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Check space before cleanup
run: |
echo "Free space:"
df -h
sudo chown runner /mnt
- name: Cleanup
run: |
docker images
sudo rm -rf "/home/work/*" || true
sudo rm -rf "/opt/*" || true
sudo rm -rf "/usr/share/dotnet" || true
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
sudo rm -rf "/usr/local/lib/android" || true
sudo rm -rf "/usr/local/share/boost" || true
sudo rm -rf "/usr/lib/jvm" || true
sudo rm -rf "/usr/share/swift" || true
sudo rm -rf "/usr/local/julia*" || true
sudo rm -rf "/usr/share/kotlinc" || true
sudo rm -rf "/usr/local/share/edge_driver" || true
sudo rm -rf "/usr/local/share/chromedriver-linux64" || true
sudo rm -rf "/usr/local/share/gecko_driver" || true
sudo rm -rf "/usr/share/miniconda" || true
sudo rm -rf "/usr/local/share/phantomjs*" || true
sudo rm -rf "/usr/share/sbt" || true
sudo rm -rf "/usr/local/sqlpackage" || true
sudo rm -rf "/usr/bin/yq" || true
sudo rm -rf "/usr/local/share/vcpkg" || true
sudo rm -rf "/usr/local/bin/terraform" || true
sudo rm -rf "/usr/local/bin/stack" || true
sudo rm -rf "/usr/local/bin/aliyun" || true
sudo rm -rf "/usr/local/bin/pulumi" || true
sudo rm -rf "/usr/local/bin/pulumi-language-dotnet" || true
sudo rm -rf "/usr/local/bin/azcopy" || true
sudo rm -rf "/usr/local/aws-cli" || true
sudo rm -rf "/usr/local/bin/bicep" || true
sudo rm -rf "/usr/local/bin/rebar3" || true
sudo rm -rf "/usr/local/bin/phpunit" || true
sudo rm -rf "/usr/local/bin/packer" || true
sudo rm -rf "/usr/local/bin/bicep" || true
sudo rm -rf "/home/.dotnet/tools" || true
sudo rm -rf "/etc/skel/.dotnet/tools" || true
sudo rm -rf "/usr/local/bin/minikube" || true
sudo rm -rf "/usr/local/bin/kustomize" || true
sudo rm -rf "/usr/local/bin/kubectl" || true
sudo rm -rf "/usr/local/bin/kind" || true
sudo rm -rf "/usr/local/bin/helm" || true
sudo rm -rf "/home/linuxbrew" || true
sudo rm -rf "/usr/share/apache-maven-3.8.8" || true
sudo rm -rf "/usr/share/gradle-8.7" || true
sudo rm -rf "/usr/local/share/phantomjs-8.6" || true
sudo rm -rf "/usr/local/bin/azcopy_11.3.1" || true
sudo rm -rf "/usr/local/bin/bicep" || true
sudo rm -rf "/usr/local/bin/.ghcup" || true
sudo rm -rf "/usr/local/.ghcup" || true
sudo rm -rf "/home/.nvm" || true
sudo rm -rf "/usr/bin/composer" || true
sudo rm -rf "/usr/local/bin/phpunit" || true
sudo rm -rf "/usr/local/bin/pulumi-analyzer-policy" || true
sudo rm -rf "/usr/local/bin/pulumi-analyzer-policy-python" || true
sudo rm -rf "/usr/local/bin/pulumi-language-java" || true
sudo rm -rf "/usr/local/bin/pulumi-language-nodejs" || true
sudo rm -rf "/usr/local/bin/pulumi-language-go" || true
sudo rm -rf "/usr/local/bin/pulumi-language-python" || true
sudo rm -rf "/usr/local/bin/pulumi-language-python-exec" || true
sudo rm -rf "/usr/local/bin/pulumi-language-yaml" || true
sudo rm -rf "/usr/local/bin/pulumi-resource-pulumi-nodejs" || true
sudo rm -rf "/usr/local/bin/pulumi-resource-pulumi-python" || true
sudo rm -rf "/usr/local/bin/pulumi-watch" || true
sudo rm -rf "/usr/local/bin/oc" || true
sudo rm -rf "/usr/local/bin/ctest" || true
sudo rm -rf "/usr/local/bin/cmake-gui" || true
sudo rm -rf "/usr/local/bin/ccmake" || true
sudo rm -rf "/usr/local/bin/cpack" || true
sudo rm -rf "/usr/local/bin/oras" || true
sudo rm -rf "/usr/local/share/emacs" || true
sudo rm -rf "/usr/local/share/fonts" || true
sudo rm -rf "/usr/local/share/icons" || true
sudo rm -rf "/usr/local/share/man" || true
sudo rm -rf "/usr/local/share/chromium" || true
sudo rm -rf "/usr/local/share/powershell" || true
sudo rm -rf "/usr/local/share/doc" || true
sudo rm -rf "/home/perflog" || true
sudo rm -rf "/usr/local/lib/lein" || true
sudo docker image prune --all --force
sudo npm uninstall bazel || true
sudo npm uninstall bazelisk || true
rustup self uninstall -y
sudo apt purge \
ansible \
aria2 \
azure-cli \
cabal* \
clang* \
dotnet-sdk* \
ghc* \
google-chrome-stable \
kubectl \
mysql* \
node* \
npm* \
php* \
powershell \
rpm \
ruby* \
subversion \
yarn \
firefox \
mono-complete \
nuget \
apache2 \
moby-engine \
moby-cli \
moby-buildx \
moby-compose \
microsoft-edge-stable \
mongodb* \
nginx \
postgresql* \
libpq-dev \
r-base \
sphinxsearch \
swig \
tcl \
temurin-* \
skopeo \
imagemagick-* \
mssql-tools* \
unixodbc-dev \
ubuntu-advantage-tools \
fonts-* \
llvm-* \
javascript-common \
openjdk-11-jre-headless \
linux-cloud-tools* \
linux-azure-6.2-* \
hicolor-icon-theme \
gcc-9 \
gcc-10 \
gcc-11 \
gcc-12 \
cloud-initramfs* \
x11-* \
bind9-* \
cloud-* \
gir1.2-* \
golang-github-* \
libjs-* \
libllvm* \
nano \
python3-* \
podman \
buildah \
skopeo \
temurin-* \
ant \
ant-optional \
libmysqlclient-dev \
libxft-dev \
libfreetype6-dev \
libfontconfig1-dev \
libpq-dev \
tcl* \
p7zip* \
gfortran-13 \
gcc-12-* \
gcc-11-* \
google-cloud-cli \
heroku \
snmp \
liblz4-dev \
man-db \
packages-microsoft-prod \
perl \
*-dev \
linux-headers-* \
manpages \
-yq || true
sudo dpkg -r packages-microsoft-prod > /dev/null 2>&1 || true
sudo apt-get autoremove -y > /dev/null 2>&1 || true
sudo apt-get autoclean -y > /dev/null 2>&1 || true
apt list --installed
ls -al /usr/local/share
- name: Setup docker
shell: bash
run: |
docker compose build --progress=plain
docker compose up -d
- name: Test
run: docker compose exec python-cpu uv run tox