Skip to content

Commit 89b1727

Browse files
[CI] AstraLinux 1.7 is tested (#21)
It has python 3.7.3. run_tests.sh upgrades pip, setuptools and wheel before his work.
1 parent f20ae1e commit 89b1727

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

.github/workflows/package-verification.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
python: "3"
6262
- platform: "altlinux_11"
6363
python: "3"
64+
- platform: "astralinux_1_7"
65+
python: "3"
6466

6567
steps:
6668
- name: Prepare variables

Dockerfile--astralinux_1_7.tmpl

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
ARG PYTHON_VERSION
2+
3+
# --------------------------------------------- base1
4+
FROM packpack/packpack:astra-1.7 AS base1
5+
6+
RUN apt update
7+
RUN apt install -y sudo curl ca-certificates
8+
RUN apt update
9+
RUN apt install -y openssh-server
10+
# RUN apt install -y time
11+
# RUN apt install -y netcat-traditional
12+
13+
RUN apt install -y git
14+
15+
# RUN apt install -y mc
16+
# RUN apt install -y nano
17+
18+
# --------------------------------------------- base2_with_python-3
19+
FROM base1 AS base2_with_python-3
20+
RUN apt install -y python3 python3-dev python3-venv
21+
ENV PYTHON_VERSION=3
22+
23+
# --------------------------------------------- final
24+
FROM base2_with_python-${PYTHON_VERSION} AS final
25+
26+
EXPOSE 22
27+
28+
RUN ssh-keygen -A
29+
30+
RUN useradd -m test
31+
32+
# It enables execution of "sudo service ssh start" without password
33+
# MY OLD:
34+
# RUN sh -c "echo test ALL=NOPASSWD:ALL" >> /etc/sudoers
35+
# AI:
36+
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
37+
38+
# THIS CMD IS NEEDED TO CONNECT THROUGH SSH WITHOUT PASSWORD
39+
RUN sh -c "echo "test:*" | chpasswd -e"
40+
RUN sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
41+
42+
ADD . /home/test/testgres
43+
RUN chown -R test /home/test/testgres
44+
WORKDIR /home/test/testgres
45+
46+
ENV LANG=C.UTF-8
47+
48+
USER test
49+
50+
RUN chmod 700 ~/
51+
RUN mkdir -p ~/.ssh
52+
RUN chmod 700 ~/.ssh
53+
54+
ENTRYPOINT sh -c " \
55+
set -eux; \
56+
echo HELLO FROM ENTRYPOINT; \
57+
echo HOME DIR IS [`realpath ~/`]; \
58+
# sudo service ssh enable; \
59+
sudo service ssh start; \
60+
ssh-keyscan -H localhost >> ~/.ssh/known_hosts; \
61+
ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts; \
62+
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
63+
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
64+
chmod 600 ~/.ssh/authorized_keys; \
65+
ls -la ~/.ssh/; \
66+
TEST_FILTER=\"\" bash run_tests3.sh;"

run_tests3.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ rm -rf $VENV_PATH
88
python3 -m venv "${VENV_PATH}"
99
export VIRTUAL_ENV_DISABLE_PROMPT=1
1010
source "${VENV_PATH}/bin/activate"
11+
pip install --upgrade pip setuptools wheel
1112
python3 -m pip install -r tests/requirements.txt
1213

1314
# run builtin tests

0 commit comments

Comments
 (0)