Skip to content

Commit

Permalink
Add e2e tests to Web Browsable API
Browse files Browse the repository at this point in the history
It's very important to provide a safe way to change
the Web Browsable API in the next tasks.

See also: #378, #377, #376, #374, #373, and #370
  • Loading branch information
nycholas committed Mar 29, 2023
1 parent 541315d commit c33e0d9
Show file tree
Hide file tree
Showing 26 changed files with 465 additions and 94 deletions.
30 changes: 30 additions & 0 deletions .docker/certs/Cenobit_Root_CA.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIFFzCCA3+gAwIBAgIQOWWFM0qvic8JSw9z/XMW+zANBgkqhkiG9w0BAQsFADCB
ozEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMTwwOgYDVQQLDDNueWNo
b2xhc0BkcmVhbWVyLmxvY2FsIChOeWNob2xhcyBPbGl2ZWlyYSBPbGl2ZWlyYSkx
QzBBBgNVBAMMOm1rY2VydCBueWNob2xhc0BkcmVhbWVyLmxvY2FsIChOeWNob2xh
cyBPbGl2ZWlyYSBPbGl2ZWlyYSkwHhcNMjEwNjE3MTMwMjQ1WhcNMzEwNjE3MTMw
MjQ1WjCBozEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMTwwOgYDVQQL
DDNueWNob2xhc0BkcmVhbWVyLmxvY2FsIChOeWNob2xhcyBPbGl2ZWlyYSBPbGl2
ZWlyYSkxQzBBBgNVBAMMOm1rY2VydCBueWNob2xhc0BkcmVhbWVyLmxvY2FsIChO
eWNob2xhcyBPbGl2ZWlyYSBPbGl2ZWlyYSkwggGiMA0GCSqGSIb3DQEBAQUAA4IB
jwAwggGKAoIBgQC/VgcpUwHdpe05ivn12+a0q71JaCcbhrSJYXFa3zXTKjymOYS8
88iEL9X671Dwl+i9phP8bkq1E9HNgFglm9IYbZ6cfdrfc8CH2L+XnZdL5glnHZdz
zTmA1iroWBTw70Y1eMUWjALK4Ib0A7qTHu5kM1gtGojYc1j1Yp4cBm6JdA/mk/Mh
/iWj+voSOeHrjYBbwUioXzVshCQsUgdc4SeH3IGp1WzvJeVI9Te+cFitssvAtI4C
IZboi/wlutjq66jhJp6JUOToXkJ/4kBrh1iTfYOWnQBP3gFG7PqAoiVc5uo+PQ/w
Yx2BilSdc0XfsLhepI1Xg1kp67pd+xf+Jw9mNdqHCYn17ldR2TXo1u8MVmEzt9qs
H7lKFh32RWOsvhFwlIIFdRGj5K6Hg16H3fZot6lpOO5yVyslettlItVWGW+bPEas
hFTX4quDscIJkRXA1yO4i+ZcsP6hWiX3KVbWVHzPd8hLOzQ3H8qvduZUROIej4b9
pFoNdePFVkORs+ECAwEAAaNFMEMwDgYDVR0PAQH/BAQDAgIEMBIGA1UdEwEB/wQI
MAYBAf8CAQAwHQYDVR0OBBYEFIliX3yj0TrwRJ78zRyNCAev611aMA0GCSqGSIb3
DQEBCwUAA4IBgQC3y+3/58Z3SZ3myaJWhrkJGdzFGVC4IHnYopptCZIJDXnt4dnX
nvTcoUZ9YVojFkhWVFo/XXecr/PJY/lgqOaPbw1t2Ah5pVgmAR8SD8FVH7vRmFWk
arlf0GXGonwTg/hhv+Fdt6HcjN+bg8XjRbCIJWGmuevnxoZru9HAcATRrhNRmsQ2
xSUg/jU3k5is7yl/UFXVnElejD9wXMWFNkdpXCV2H81CQAwpSW0mTrq31FUpnHPX
qqVa77OQo2HFQdNwEnqPlBqR9wOGuSn2LrRCm1V+rAF8UhPybU3BesoKk+lWv7wc
0e37Er3sxTzBkdnWQy3/8JSrqyUzn+xlWQ3KkM9rrC28VGQkTx83Dp7ln0ad9vNd
qK0i7xDv4iX7lbeJ38/qAwB5Lfnaw5SNhmVkv+CZKYHPnleixPUrlhP3w7KhVz4r
nAEz1HYZ3pi/xqeWln0D+UfehUc42pcGIW1Ia+CxRut8DM1Mu1KJoSxh9dsk1n7I
cowv7zPb0KBbtJM=
-----END CERTIFICATE-----
17 changes: 17 additions & 0 deletions .docker/nginx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# nginx

### Creating the SSL Certificate

```
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/nginx-ssl.key -out ssl/nginx-ssl.crt
$ openssl dhparam -out ssl/ssl-dhparam.pem 4096
```

### Creating Root CA and Domain Certifications

See [here](https://github.com/FiloSottile/mkcert#installation) how to install mkcert.
```
$ mkcert -install
$ mkcert -key-file ssl/flask-jsonrpc.cenobit.es.key -cert-file ssl/flask-jsonrpc.cenobit.es.crt *.flask-jsonrpc.cenobit.es
$ cp -rf "$(mkcert -CAROOT)/rootCA.pem" ../certs/
```
28 changes: 28 additions & 0 deletions .docker/nginx/conf.d/app.flask-jsonrpc.cenobit.es.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
server {
listen 443 ssl;
listen [::]:443 ssl;

ssl_certificate /etc/nginx/ssl/flask-jsonrpc.cenobit.es.crt;
ssl_certificate_key /etc/nginx/ssl/flask-jsonrpc.cenobit.es.key;

include ssl/ssl-params.conf;

server_name app.flask-jsonrpc.cenobit.es;

location / {
proxy_pass http://app:5000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix /;
}
}

server {
listen 80;
listen [::]:80;

server_name app.flask-jsonrpc.cenobit.es;

return 302 https://$server_name$request_uri;
}
28 changes: 28 additions & 0 deletions .docker/nginx/conf.d/async-app.flask-jsonrpc.cenobit.es.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
server {
listen 443 ssl;
listen [::]:443 ssl;

ssl_certificate /etc/nginx/ssl/flask-jsonrpc.cenobit.es.crt;
ssl_certificate_key /etc/nginx/ssl/flask-jsonrpc.cenobit.es.key;

include ssl/ssl-params.conf;

server_name async-app.flask-jsonrpc.cenobit.es;

location / {
proxy_pass http://async_app:5000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix /;
}
}

server {
listen 80;
listen [::]:80;

server_name async-app.flask-jsonrpc.cenobit.es;

return 302 https://$server_name$request_uri;
}
17 changes: 17 additions & 0 deletions .docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
events {
worker_connections 1024;
}

http {
server {
listen 80;
listen [::]:80;

server_name 127.0.0.1;

root /opt/test-static/public;
index index.html;
}

include /etc/nginx/conf.d/*.conf;
}
27 changes: 27 additions & 0 deletions .docker/nginx/ssl/flask-jsonrpc.cenobit.es.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEjjCCAvagAwIBAgIRAJdntdMRAvSoHdaDsHUxPPkwDQYJKoZIhvcNAQELBQAw
gaMxHjAcBgNVBAoTFW1rY2VydCBkZXZlbG9wbWVudCBDQTE8MDoGA1UECwwzbnlj
aG9sYXNAZHJlYW1lci5sb2NhbCAoTnljaG9sYXMgT2xpdmVpcmEgT2xpdmVpcmEp
MUMwQQYDVQQDDDpta2NlcnQgbnljaG9sYXNAZHJlYW1lci5sb2NhbCAoTnljaG9s
YXMgT2xpdmVpcmEgT2xpdmVpcmEpMB4XDTIzMDMyOTExMTAxOFoXDTI1MDYyOTEx
MTAxOFowcDEnMCUGA1UEChMebWtjZXJ0IGRldmVsb3BtZW50IGNlcnRpZmljYXRl
MUUwQwYDVQQLDDxueWNob2xhc0BCUjM2MDAwMk1CUDE2SU40LmxvY2FsIChOeWNo
b2xhcyBPbGl2ZWlyYSBPbGl2ZWlyYSkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDAzjlsHOl7sq9GpCdeNcP9NYKfjBm6SZQviJ/xDJTFQEsQuJ9t85oW
SsLI0SgAXO+o2XndrgjCE+u5CEiRzHnTAb/OHQH4Sp3JizbXnDcRZHOp1ZJPb9Xl
ZiQ7tGFFkm5Dah1Vh5eV1wTfQejfiA4XoN5DY67HkAy1+TRQ7TTXu1C7cG5DMEfQ
7FJaDNKHwQjPtiEoGCoWH0iRy2Z8P0mu0plx8Yuqo5JKWox9vuFEnndhN7kat4I3
QN6FEnOZSltKx9iUImew8iTWiTgMEYguqWiZqVc2lxE0U7gyQueMFGraPIJT23oS
j5W6eCxfQ93NKFwF4AmqCm/Hmh344TIjAgMBAAGjbzBtMA4GA1UdDwEB/wQEAwIF
oDATBgNVHSUEDDAKBggrBgEFBQcDATAfBgNVHSMEGDAWgBSJYl98o9E68ESe/M0c
jQgHr+tdWjAlBgNVHREEHjAcghoqLmZsYXNrLWpzb25ycGMuY2Vub2JpdC5lczAN
BgkqhkiG9w0BAQsFAAOCAYEAJ1b/TDRnPk1y0uRIhLdwjtnIdpoTK5sgii5uKXAN
SDdVM+5MPjqv53AeVw7SbylZtkQD3T3QTXHMhRbRl4cxWLV+H/uqkXuClUyWUK2V
AD66v/rlz6A6f2G/K2+JDLWnwuaVgBDOEOC5b4fFICLJMPmeY1VAz11VoMlCiYSC
uRhKubZYHvkGGGvLy/G23jp042+Z3B/X8ofZG8eBXgW/gOfzRKS63wKzK5u58AZ0
/PzCWb33+KCPfRmwl7a6qCRbN8kiMJGfVYF7teKZ9RZ+LpSb1tCOUjzkEKtxlBkW
HManFwJL8hkhMoYct1UUobzXD4/uUtnCnS/kFHLfj2611dqjPTyE5/KGsSIEONAc
xgZim6dR/B9xT8ug6d7t7VS2VP10vckw6B9m47QOCyEYJZqHZgma3J1sAk6J5pI/
fgoA2cgXCo+ybnqvrCUpf+COHjO1KP8m4OjuiGGBu01AAfqq7EVV1ypudZZZYWdx
4suMPBGRXjprL/iJu1qsnRlu
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions .docker/nginx/ssl/flask-jsonrpc.cenobit.es.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDAzjlsHOl7s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kowV9P/qox1eFEmxYHTe1ITiz80KOl58JPC
rWo8zgXKbBMIH10cA8V5mjwBCwVlOKS/vj7dqyvmr7smT7esy9pQhQlP9DVAFZon
ZEdjtwmM7S6DN1811u2ebUN5OgzItizP31ZSZugOWlt0Ld/a77cBIAdtAoGAS+fY
6hj4KpCXKwrsoiya4TQuBVEp04dVQQHPQbqfJyibp0xy1jzgj8UptL/279xkhQ0U
7+Rw6z6c5HWfW7a5Q1eZ73fC4JrMs/XIGYgKBFuk3I4c0X43JL4UaYLeNRO67Gbc
3/Xnjvh7U/sv/UFVBP3pxYafgJ/hDMnitwWRU0kCgYBm8HzY5Qk7C5kIS4Z8Luym
DDWpBZMviet/PW4lY8kGEBQf0ImtOC24HisncyWOUFnueNeGVXuMu0gXSMT891Z9
MoboHEBEhBhhlzQN79RCZIrFS0n3Xt86oeOIzZyJJjCyenKEgjy92WjRpRSBNCyC
VxdcxQ1rL411Gba/sr+sEw==
-----END PRIVATE KEY-----
23 changes: 23 additions & 0 deletions .docker/nginx/ssl/nginx-ssl.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDwDCCAqgCCQCoAmvkcyQMdjANBgkqhkiG9w0BAQsFADCBoTELMAkGA1UEBhMC
QlIxFTATBgNVBAgMDFPDg8KjbyBQYXVsbzEVMBMGA1UEBwwMU8ODwqNvIFBhdWxv
MSMwIQYDVQQKDBpDZW5vYml0IFRlY2hub2xvZ2llcywgSW5jLjEMMAoGA1UECwwD
UiZEMRMwEQYDVQQDDApjZW5vYml0LmVzMRwwGgYJKoZIhvcNAQkBFg1oaUBjZW5v
Yml0LmVzMB4XDTIzMDMyOTExMzMyOVoXDTI0MDMyODExMzMyOVowgaExCzAJBgNV
BAYTAkJSMRUwEwYDVQQIDAxTw4PCo28gUGF1bG8xFTATBgNVBAcMDFPDg8KjbyBQ
YXVsbzEjMCEGA1UECgwaQ2Vub2JpdCBUZWNobm9sb2dpZXMsIEluYy4xDDAKBgNV
BAsMA1ImRDETMBEGA1UEAwwKY2Vub2JpdC5lczEcMBoGCSqGSIb3DQEJARYNaGlA
Y2Vub2JpdC5lczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbjCXNz
FEDs86vNCtXZqUjoyEGOHw2ei0kcUAFmdp2LEpE1cWyKHu5xHQZPZed+5UzyoKKu
M/6L8oY5wlAZgeZc+yia3q0BL4XftVA90sjG9UGEIv4hXsuYJwiq8nGnXUdpYxKA
ZhuLTyp3l7M67/Q/RzgZ/1j8itm97iaDuL1mF4bRArFXj/KZw5yloDLMPo7dEr1y
JFLzxXC2rPbFOA9bEazym+/sQL1V1VBTc65HENeGcNUSBM1N62XnP9d+lUIJAe4N
pBetAyMQ0RHWkfJoDD8Jh+J6UlY4/0WEgcaLZsxDSyALHFkbzx1R1uMBaGfSWD8B
EoB/zGmiLBHu278CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAj+5Qwfxz02vnPon7
2MzjmFE/GVbXf/NKjCP95cXnoJAJ0XiGjkZxeQu6K3+W8NSEdfiQJoe+3sRGlcsn
pKzOpwi1Ce9hQq3bBzNTF2lgk+opznT6VWCotBeTwczOENkk66hvr18eXSvOuTAs
yFSHJnjU86Eu0c4pyWyY5vyFrvdvt5OamlNSThL4K3mniIdPLYNyKHqPy9Y7UKiE
XtmaIFiqvhxqpBVBDmKGXlxIpi/8uFRfAgiT6aNZqStUesmCpFWM2L1Z50t+KcZK
LPce6Xj7r2BsGzODrTNPNAlk1F5J4cGBUmGcY1F/bT3cV3dtoOejALi3shumwEyI
14/yWQ==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions .docker/nginx/ssl/nginx-ssl.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDG4wlzcxRA7POr
zQrV2alI6MhBjh8NnotJHFABZnadixKRNXFsih7ucR0GT2X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KLKKcumC54LaUJWkLj/7QwnVbYBmQbBWPablp2sIdKsRG
s16E+hw2jDNPQsvVyljhEvQrn6DyPQNgFaHcDC3+mPIZrDeIec7wwdVeiQKBgFTg
hsqI6WdmAq8EiADn8bOU5JqjyQ7CnrJYMfoc3ccOZ0XPzh76/IixYZFACf/qNShK
9waEX1MLzQrjW9xPNWplK1/gt3xIFF40lqBfk0t/Uia2seTO/74Br2/0iLTtE9kp
o0VKpi9ZL44MTWCtZxPTslDC1PO16VW+kX480n51AoGBAOnmGW4NQet8RQ+xrU97
j4aDu7kCxAThWEYXeTeXnfayvmQxyLQLLaTasLCFdjg2ZugiGe2xoDOwYrNTKaqz
6ZiFf8NpcEelaBDZKlu6AuqnTSzHgnBNAeCaLd/6sbI8R9FDV2sftl77Wzqa/m0Q
SA498fqP2guqs8L+TLZ0A298
-----END PRIVATE KEY-----
13 changes: 13 additions & 0 deletions .docker/nginx/ssl/ssl-dhparam.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-----BEGIN DH PARAMETERS-----
MIICCAKCAgEAl1mU+XPxrdQiHynGOOwwq/ruzp2+nrNslMzl082/thKDrovwDYB0
BCftWYW+NsOLQKqrsty8guBVxR34v8HlEFD/vo1zsVw1eTrB/cohSQKKuxhJB30C
veQaJ0iQa2pxpW6YY3+M3SnrMcGedBWGoq39npgKPNBfCciUtwt1rmuY5R2R6ojS
CpU7FoBso13HMrQtaNx1YOJ1J+7bIUXvdR8/2zTsQ3ZiD3IAKc5n+D61BNBTtY/e
/Ck9Mw9ZOBuHyhXkWMpF/o8dvwM1/yac4NxYbxWIbGMGm8ls2YMALBC88wH56wcg
rjQQpM7d76F0cCYqfLnJml2vQFWrSiwcByU4UKIESWQqeKh2YfaWl82I/i6uR9Vr
yJI7FMvPKNoSkl+lFH2Wax6kVEHAsTgsmn89wXCja7AhoGhfvmPfXtbUOSmfzJvJ
gTScR0NoXJdcfpSCbbob6SQsc1r61nR/8JZy9QWJouOd48vb7Tn0+tqS1qbY7Cmj
20YGBDtyx0LKXTZ1nfD8wdENhRqOddOtSq+X5haENYapxMSTMOFlpFsZ3xz4ByHR
1EmcdML/obbkfPJ5EUzRgLv1OskCCFAbc/OqzN4AIbBTPteChZHqqaK3q51AVlup
0vyJ8MEfCjuZIanWFcYEMBja6utfBDDIZz76ue0pEt0P4kcxc0KGUlsCAQI=
-----END DH PARAMETERS-----
12 changes: 12 additions & 0 deletions .docker/nginx/ssl/ssl-params.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/ssl-dhparam.pem;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_ecdh_curve secp384r1;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 1.1.1.1 1.1.2.2 valid=300s;
resolver_timeout 5s;
22 changes: 20 additions & 2 deletions Dockerfile.it
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apk add --no-cache --update --virtual .build-deps \
linux-headers \
ca-certificates \
python3-dev \
git \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk \
&& ln -sf /lib/ld-musl-x86_64.so.1 /usr/bin/ldd \
Expand All @@ -14,23 +15,38 @@ WORKDIR /svc

COPY requirements/test.txt /svc/
RUN pip install pip setuptools wheel --upgrade \
&& pip wheel --wheel-dir=/svc/wheels -r test.txt
&& pip wheel --wheel-dir=/svc/wheels -r test.txt \
poetry-core>=1.0.0

FROM python:3.10-alpine

ENV PYTHONUNBUFFERED=1 \
DEBUG=0 \
PYTEST_CACHE_DIR=".pytest_cache" \
SITE_DOMAIN="app" \
SITE_PORT=5000
SITE_PORT=5000 \
WEB_URL="http://app:5000" \
API_URL="http://app:5000/api" \
BROWSABLE_API_URL="http://app:5000/api/browse"

RUN apk add --no-cache --update \
git \
chromium \
chromium-chromedriver \
ca-certificates \
openssl \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk \
&& ln -sf /lib/ld-musl-x86_64.so.1 /usr/bin/ldd \
&& ln -s /lib /lib64 \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone

ADD .docker/certs/Cenobit_Root_CA.pem /usr/local/share/ca-certificates/Cenobit_Root_CA.pem
RUN openssl x509 -inform PEM -in /usr/local/share/ca-certificates/Cenobit_Root_CA.pem -out /usr/local/share/ca-certificates/Cenobit_Root_CA.crt \
&& chmod 644 /usr/local/share/ca-certificates/Cenobit_Root_CA.crt \
&& update-ca-certificates

WORKDIR /svc

COPY --from=builder /svc /svc
Expand All @@ -52,6 +68,8 @@ RUN pip install pip setuptools wheel --upgrade \
--no-create-home \
-s /bin/false \
flask_user \
&& mkdir -p /app/test-results \
&& mkdir -p /app/.pytest_cache/screenshots \
&& chown flask_user:flask_user -R /app

USER flask_user
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ RUN pip install pip setuptools wheel --upgrade \
FROM python:3.10-alpine

ENV PYTHONUNBUFFERED=1 \
DEBUG=0
DEBUG=0 \
FLASK_SERVER_NAME="app:5000"

RUN apk add --no-cache --update \
&& rm -rf /var/cache/* \
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile.py310.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ COPY requirements/ /code/requirements/
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
g++ \
cmake \
rust \
cargo \
musl-dev \
python3-dev \
&& pip install pip setuptools wheel --upgrade \
git \
&& pip install pip setuptools --upgrade \
&& pip install -r requirements/base.txt \
&& pip install -r requirements/test.txt \
poetry-core>=1.0.0 \
&& pip install -r requirements/ci.txt \
&& apk del .build-deps \
&& addgroup -S kuchulu \
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.py37.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ COPY requirements/ /code/requirements/
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
g++ \
musl-dev \
python3-dev \
git \
&& pip install pip setuptools wheel --upgrade \
&& pip install -r requirements/base.txt \
&& pip install -r requirements/test.txt \
poetry-core>=1.0.0 \
&& pip install -r requirements/ci.txt \
&& apk del .build-deps \
&& addgroup -S kuchulu \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.py38.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ RUN set -ex \
gcc \
musl-dev \
python3-dev \
git \
&& pip install pip setuptools wheel --upgrade \
&& pip install -r requirements/base.txt \
&& pip install -r requirements/test.txt \
poetry-core>=1.0.0 \
&& pip install -r requirements/ci.txt \
&& apk del .build-deps \
&& addgroup -S kuchulu \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.py39.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ RUN set -ex \
gcc \
musl-dev \
python3-dev \
git \
&& pip install pip setuptools wheel --upgrade \
&& pip install -r requirements/base.txt \
&& pip install -r requirements/test.txt \
poetry-core>=1.0.0 \
&& pip install -r requirements/ci.txt \
&& apk del .build-deps \
&& addgroup -S kuchulu \
Expand Down
Loading

0 comments on commit c33e0d9

Please sign in to comment.