Skip to content

Commit caa7e95

Browse files
committed
Merge pull request #136 from ligangty/main
Chore: fix github ci test failure
1 parent a3c66da commit caa7e95

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/linters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
os:
2121
- name: centos
22-
version: 8
22+
version: 7
2323
python: 3
2424
engine: docker
2525

.github/workflows/unittests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
os:
2020
- name: centos
21-
version: 8
21+
version: 7
2222
python: 3
2323
engine: docker
2424

test.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eux
44
# Prepare env vars
55
ENGINE=${ENGINE:="podman"}
66
OS=${OS:="centos"}
7-
OS_VERSION=${OS_VERSION:="8"}
7+
OS_VERSION=${OS_VERSION:="7"}
88
PYTHON_VERSION=${PYTHON_VERSION:="3"}
99
ACTION=${ACTION:="test"}
1010
IMAGE="$OS:$OS_VERSION"
@@ -33,19 +33,22 @@ function setup_charon() {
3333
PKG_EXTRA=(dnf-plugins-core git "$PYTHON"-pylint)
3434
BUILDDEP=(dnf builddep)
3535
if [[ $OS == "centos" ]]; then
36+
PKG="yum"
37+
PKG_EXTRA=(yum-utils git "$PYTHON"-pylint)
38+
BUILDDEP=(yum-builddep)
3639
ENABLE_REPO=
3740
else
3841
ENABLE_REPO="--enablerepo=updates-testing"
3942
fi
43+
4044

4145
PIP_INST=("$PIP" install --index-url "${PYPI_INDEX:-https://pypi.org/simple}")
4246

4347
if [[ $OS == "centos" ]]; then
4448
# Don't let builddep enable *-source repos since they give 404 errors
4549
$RUN rm -f /etc/yum.repos.d/CentOS-Sources.repo
46-
# Resolve "Failed to download metadata for repo: Cannot prepare internal mirrorlist: No URLs in mirrorlist" problem
47-
$RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-AppStream.repo
48-
$RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
50+
# $RUN rm -f /etc/yum.repos.d/CentOS-Linux-AppStream.repo
51+
# $RUN rm -f /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
4952
# This has to run *before* we try installing anything from EPEL
5053
$RUN $PKG $ENABLE_REPO install -y epel-release
5154
fi
@@ -69,7 +72,7 @@ function setup_charon() {
6972
fi
7073

7174
# install with RPM_PY_SYS=true to avoid error caused by installing on system python
72-
$RUN sh -c "RPM_PY_SYS=true ${PIP_INST[*]} rpm-py-installer"
75+
#$RUN sh -c "RPM_PY_SYS=true ${PIP_INST[*]} rpm-py-installer"
7376
# Setuptools install charon from source
7477
$RUN $PYTHON setup.py install
7578

0 commit comments

Comments
 (0)