-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (112 loc) · 2.83 KB
/
tests.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
name: tests
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# pull_request:
# branchs:
# - 'feature/**'
# - 'fix/**'
# - 'refactor/**'
jobs:
test:
runs-on: self-hosted
name: Testes
steps:
- name: checkout PR merge commit
uses: actions/checkout@v3
- name: Executa um echo
run: echo 'Olá mundo!'
- name: Testes de esforço
run: |
docker \
run \
-t \
--rm \
polinux/stress-ng \
--cpu 4 \
--io 4 \
--vm 2 \
--vm-bytes 128M \
--fork 4 \
--timeout 10s
- name: Executa GNU hello e python3
run: |
hello
python --version
- name: Metadatas
run: |
cat /etc/os*release
echo
# cat /etc/group
uname -a
echo
id
echo
pwd
echo
ls -alh
echo
nproc
echo
free -h
echo
# sudo id
# A ideia aqui é testar persistência de estado
cat $HOME/logs.txt || true
echo FOO-BAR > $HOME/logs.txt
- name: Testes sobre docker
run: |
# env | sort
# touch /dev/kvm
which docker
readlink -f $(which docker)
docker --version
docker info
docker images
docker run --rm alpine cat /etc/os-release
docker images
docker build --tag custom-python .
docker images
- name: Testes sobre /dev/kvm
run: |
id
docker run --privileged=true --rm \
alpine sh -c 'id && touch /dev/kvm && stat /dev/kvm'
- name: Testes sobre DinD
run: |
docker rm --force dind-container || true
docker \
run \
--device=/dev/kvm \
-d \
-t \
--name=dind-container --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
docker:24.0.7-dind-alpine3.18 \
tail -f /dev/null
echo
docker \
exec \
-t \
dind-container \
/bin/sh \
-c \
'docker run -t --rm alpine cat /etc/os-release'
- name: Testes sobre PinD
run: |
docker \
run \
--privileged=true \
--rm \
quay.io/podman/stable \
podman run quay.io/podman/hello
- name: Mais metadados
run: |
nix flake --version
nix flake metadata nixpkgs
echo
nix build --no-link --print-out-paths nixpkgs#dockerTools.examples.redis
echo
nix build --no-link --print-out-paths --rebuild nixpkgs#dockerTools.examples.redis