Update tests
This commit is contained in:
parent
80af7a35f3
commit
7e809c2042
4
.github/workflows/check_urls.yml
vendored
4
.github/workflows/check_urls.yml
vendored
@ -39,7 +39,8 @@ jobs:
|
|||||||
$wg vpnsetup_amzn.sh "$gi/vpnsetup-amzn"
|
$wg vpnsetup_amzn.sh "$gi/vpnsetup-amzn"
|
||||||
$wg vpnsetup_ubuntu.sh "$gi/vpnsetup-ubuntu"
|
$wg vpnsetup_ubuntu.sh "$gi/vpnsetup-ubuntu"
|
||||||
$wg vpnsetup_alpine.sh "$gi/vpnsetup-alpine"
|
$wg vpnsetup_alpine.sh "$gi/vpnsetup-alpine"
|
||||||
$wg quickstart.sh "$gi/vpnquickstart"
|
$wg quickstart.sh "$gi/vpnstart"
|
||||||
|
$wg quickstart_.sh "$gi/vpnquickstart"
|
||||||
$wg ikev2setup.sh "$gi/ikev2setup"
|
$wg ikev2setup.sh "$gi/ikev2setup"
|
||||||
$wg vpnupgrade.sh "$gi/vpnupgrade"
|
$wg vpnupgrade.sh "$gi/vpnupgrade"
|
||||||
$wg vpnupgrade_centos.sh "$gi/vpnupgrade-centos"
|
$wg vpnupgrade_centos.sh "$gi/vpnupgrade-centos"
|
||||||
@ -68,6 +69,7 @@ jobs:
|
|||||||
diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh
|
diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh
|
||||||
diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh
|
diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh
|
||||||
diff quickstart.sh ../extras/quickstart.sh
|
diff quickstart.sh ../extras/quickstart.sh
|
||||||
|
diff quickstart_.sh ../extras/quickstart.sh
|
||||||
diff ikev2setup.sh ../extras/ikev2setup.sh
|
diff ikev2setup.sh ../extras/ikev2setup.sh
|
||||||
diff vpnupgrade.sh ../extras/vpnupgrade.sh
|
diff vpnupgrade.sh ../extras/vpnupgrade.sh
|
||||||
diff vpnupgrade_centos.sh ../extras/vpnupgrade_centos.sh
|
diff vpnupgrade_centos.sh ../extras/vpnupgrade_centos.sh
|
||||||
|
28
.github/workflows/test_set_1.yml
vendored
28
.github/workflows/test_set_1.yml
vendored
@ -22,11 +22,19 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OS_VERSION: ${{ matrix.os_version }}
|
OS_VERSION: ${{ matrix.os_version }}
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # 2.4.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "$GITHUB_WORKSPACE/testing/${OS_VERSION//:}"
|
mkdir -p "$GITHUB_WORKSPACE/testing/${OS_VERSION//:}"
|
||||||
cd "$GITHUB_WORKSPACE/testing/${OS_VERSION//:}"
|
cd "$GITHUB_WORKSPACE/testing/${OS_VERSION//:}"
|
||||||
|
|
||||||
|
mkdir -p scripts/extras
|
||||||
|
ls -ld "$GITHUB_WORKSPACE/vpnsetup.sh"
|
||||||
|
cp -f "$GITHUB_WORKSPACE"/*.sh scripts/
|
||||||
|
cp -f "$GITHUB_WORKSPACE"/extras/*.sh scripts/extras/
|
||||||
|
|
||||||
cat > run.sh <<'EOF'
|
cat > run.sh <<'EOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eEx
|
set -eEx
|
||||||
@ -71,11 +79,12 @@ jobs:
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cd /opt/src
|
||||||
yum -y -q update
|
yum -y -q update
|
||||||
yum -y -q install wget rsyslog
|
yum -y -q install wget rsyslog
|
||||||
systemctl start rsyslog
|
systemctl start rsyslog
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
|
cp -f /opt/src/scripts/vpnsetup.sh .
|
||||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
||||||
|
|
||||||
sh vpnsetup.sh
|
sh vpnsetup.sh
|
||||||
@ -102,7 +111,7 @@ jobs:
|
|||||||
ls -l /usr/bin/ikev2.sh
|
ls -l /usr/bin/ikev2.sh
|
||||||
ls -l /opt/src/ikev2.sh
|
ls -l /opt/src/ikev2.sh
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnunst.sh https://git.io/vpnuninstall
|
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
|
||||||
bash vpnunst.sh <<ANSWERS
|
bash vpnunst.sh <<ANSWERS
|
||||||
y
|
y
|
||||||
ANSWERS
|
ANSWERS
|
||||||
@ -111,7 +120,7 @@ jobs:
|
|||||||
mkdir /etc/xl2tpd
|
mkdir /etc/xl2tpd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O quickstart.sh https://git.io/vpnquickstart
|
cp -f /opt/src/scripts/extras/quickstart.sh .
|
||||||
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
||||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
||||||
|
|
||||||
@ -151,9 +160,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" != "amazon" ]; then
|
if [ "$1" != "amazon" ]; then
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-centos
|
cp -f /opt/src/scripts/vpnsetup_centos.sh ./vpnsetup.sh
|
||||||
else
|
else
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-amzn
|
cp -f /opt/src/scripts/vpnsetup_amzn.sh ./vpnsetup.sh
|
||||||
fi
|
fi
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' vpnsetup.sh
|
sed -i '/swan_ver_latest=/s/^/#/' vpnsetup.sh
|
||||||
|
|
||||||
@ -190,7 +199,7 @@ jobs:
|
|||||||
ls -l /usr/bin/ikev2.sh
|
ls -l /usr/bin/ikev2.sh
|
||||||
ls -l /opt/src/ikev2.sh
|
ls -l /opt/src/ikev2.sh
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O ikev2.sh https://git.io/ikev2setup # hwdsl2
|
cp -f /opt/src/scripts/extras/ikev2setup.sh ./ikev2.sh # hwdsl2
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' ikev2.sh
|
sed -i '/swan_ver_latest=/s/^/#/' ikev2.sh
|
||||||
|
|
||||||
bash ikev2.sh <<ANSWERS
|
bash ikev2.sh <<ANSWERS
|
||||||
@ -411,7 +420,7 @@ jobs:
|
|||||||
restart_ipsec
|
restart_ipsec
|
||||||
ipsec status | grep -q ikev2-cp
|
ipsec status | grep -q ikev2-cp
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade
|
cp -f /opt/src/scripts/extras/vpnupgrade.sh ./vpnup.sh
|
||||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
|
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
|
||||||
|
|
||||||
for ver in 4.4 ""; do
|
for ver in 4.4 ""; do
|
||||||
@ -427,9 +436,9 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$1" != "amazon" ]; then
|
if [ "$1" != "amazon" ]; then
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-centos
|
cp -f /opt/src/scripts/extras/vpnupgrade_centos.sh ./vpnup.sh
|
||||||
else
|
else
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-amzn
|
cp -f /opt/src/scripts/extras/vpnupgrade_amzn.sh ./vpnup.sh
|
||||||
fi
|
fi
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
||||||
|
|
||||||
@ -482,6 +491,7 @@ jobs:
|
|||||||
rm -f /lib/systemd/system/basic.target.wants/*; \
|
rm -f /lib/systemd/system/basic.target.wants/*; \
|
||||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|
||||||
|
COPY scripts/ /opt/src/scripts/
|
||||||
COPY ./run.sh /opt/src/run.sh
|
COPY ./run.sh /opt/src/run.sh
|
||||||
RUN chmod 755 /opt/src/run.sh
|
RUN chmod 755 /opt/src/run.sh
|
||||||
|
|
||||||
|
22
.github/workflows/test_set_2.yml
vendored
22
.github/workflows/test_set_2.yml
vendored
@ -23,6 +23,9 @@ jobs:
|
|||||||
image: ${{ matrix.os_version }}
|
image: ${{ matrix.os_version }}
|
||||||
options: --cap-add=NET_ADMIN --device=/dev/ppp
|
options: --cap-add=NET_ADMIN --device=/dev/ppp
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # 2.4.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
@ -70,6 +73,7 @@ jobs:
|
|||||||
|
|
||||||
mkdir -p /opt/src
|
mkdir -p /opt/src
|
||||||
cd /opt/src
|
cd /opt/src
|
||||||
|
ls -ld "$GITHUB_WORKSPACE/vpnsetup.sh"
|
||||||
echo "# hwdsl2" > run.sh
|
echo "# hwdsl2" > run.sh
|
||||||
|
|
||||||
if [ "$os_type" = "alpine" ]; then
|
if [ "$os_type" = "alpine" ]; then
|
||||||
@ -83,7 +87,7 @@ jobs:
|
|||||||
service rsyslog start
|
service rsyslog start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
|
cp -f "$GITHUB_WORKSPACE"/vpnsetup.sh .
|
||||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
||||||
|
|
||||||
sh vpnsetup.sh
|
sh vpnsetup.sh
|
||||||
@ -115,7 +119,7 @@ jobs:
|
|||||||
ls -l /usr/bin/ikev2.sh
|
ls -l /usr/bin/ikev2.sh
|
||||||
ls -l /opt/src/ikev2.sh
|
ls -l /opt/src/ikev2.sh
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnunst.sh https://git.io/vpnuninstall
|
cp -f "$GITHUB_WORKSPACE"/extras/vpnuninstall.sh ./vpnunst.sh
|
||||||
bash vpnunst.sh <<ANSWERS
|
bash vpnunst.sh <<ANSWERS
|
||||||
y
|
y
|
||||||
ANSWERS
|
ANSWERS
|
||||||
@ -126,7 +130,7 @@ jobs:
|
|||||||
killall xl2tpd || true
|
killall xl2tpd || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O quickstart.sh https://git.io/vpnquickstart
|
cp -f "$GITHUB_WORKSPACE"/extras/quickstart.sh .
|
||||||
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
||||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
||||||
|
|
||||||
@ -172,9 +176,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$os_type" = "alpine" ]; then
|
if [ "$os_type" = "alpine" ]; then
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-alpine
|
cp -f "$GITHUB_WORKSPACE"/vpnsetup_alpine.sh ./vpnsetup.sh
|
||||||
else
|
else
|
||||||
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-ubuntu
|
cp -f "$GITHUB_WORKSPACE"/vpnsetup_ubuntu.sh ./vpnsetup.sh
|
||||||
fi
|
fi
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' vpnsetup.sh
|
sed -i '/swan_ver_latest=/s/^/#/' vpnsetup.sh
|
||||||
|
|
||||||
@ -214,7 +218,7 @@ jobs:
|
|||||||
ls -l /usr/bin/ikev2.sh
|
ls -l /usr/bin/ikev2.sh
|
||||||
ls -l /opt/src/ikev2.sh
|
ls -l /opt/src/ikev2.sh
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O ikev2.sh https://git.io/ikev2setup
|
cp -f "$GITHUB_WORKSPACE"/extras/ikev2setup.sh ./ikev2.sh
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' ikev2.sh
|
sed -i '/swan_ver_latest=/s/^/#/' ikev2.sh
|
||||||
|
|
||||||
bash ikev2.sh <<ANSWERS
|
bash ikev2.sh <<ANSWERS
|
||||||
@ -440,7 +444,7 @@ jobs:
|
|||||||
restart_ipsec
|
restart_ipsec
|
||||||
ipsec status | grep -q ikev2-cp
|
ipsec status | grep -q ikev2-cp
|
||||||
|
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade
|
cp -f "$GITHUB_WORKSPACE"/extras/vpnupgrade.sh ./vpnup.sh
|
||||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
|
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
|
||||||
|
|
||||||
[ "$os_type" = "alpine" ] && ver1=4.5 || ver1=4.4
|
[ "$os_type" = "alpine" ] && ver1=4.5 || ver1=4.4
|
||||||
@ -460,9 +464,9 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$os_type" = "alpine" ]; then
|
if [ "$os_type" = "alpine" ]; then
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-alpine
|
cp -f "$GITHUB_WORKSPACE"/extras/vpnupgrade_alpine.sh ./vpnup.sh
|
||||||
else
|
else
|
||||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-ubuntu
|
cp -f "$GITHUB_WORKSPACE"/extras/vpnupgrade_ubuntu.sh ./vpnup.sh
|
||||||
fi
|
fi
|
||||||
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user