Skip to content

Commit 8155f14

Browse files
committed
Update tests
1 parent ec4e830 commit 8155f14

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/test_set_2.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.repository_owner == 'hwdsl2'
1818
strategy:
1919
matrix:
20-
os_version: ["ubuntu:24.04", "ubuntu:22.04", "debian:12", "debian:11", "alpine:3.21", "alpine:3.20"]
20+
os_version: ["ubuntu:24.04", "ubuntu:22.04", "debian:13", "debian:12", "debian:11", "alpine:3.21", "alpine:3.20"]
2121
fail-fast: false
2222
container:
2323
image: ${{ matrix.os_version }}
@@ -33,6 +33,9 @@ jobs:
3333
os_type=""
3434
[ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID")
3535
[ -z "$os_type" ] && exit 1
36+
if [ "$os_type" != "alpine" ]; then
37+
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
38+
fi
3639
3740
log1=/var/log/auth.log
3841
if [ "$os_type" = "alpine" ]; then
@@ -42,8 +45,7 @@ jobs:
4245
fi
4346
4447
restart_ipsec() {
45-
if [ "$os_type" = "alpine" ] \
46-
|| grep -qs trixie /etc/debian_version; then
48+
if [ "$os_type" = "alpine" ] || [ "$os_ver" = "trixiesid" ]; then
4749
ipsec whack --shutdown || true
4850
ipsec pluto --config /etc/ipsec.conf
4951
fi
@@ -86,7 +88,7 @@ jobs:
8688
apt-get -yqq dist-upgrade
8789
apt-get -yqq install wget rsyslog
8890
if grep -qs -e bookworm -e trixie /etc/debian_version \
89-
|| [ "$(sed 's/\..*//' /etc/debian_version 2>/dev/null)" = "12" ]; then
91+
|| [ "$os_ver" = 13 ] || [ "$os_ver" = 12 ]; then
9092
rsyslogd
9193
else
9294
service rsyslog start
@@ -106,7 +108,7 @@ jobs:
106108
restart_ipsec
107109
else
108110
restart_ipsec
109-
if ! grep -qs trixie /etc/debian_version; then
111+
if [ "$os_ver" != "trixiesid" ]; then
110112
restart_fail2ban
111113
cat /var/log/fail2ban.log
112114
fi
@@ -495,8 +497,7 @@ jobs:
495497
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
496498
497499
for ver in 5.1 ""; do
498-
if [ "$os_type" = "alpine" ] \
499-
|| grep -qs trixie /etc/debian_version; then
500+
if [ "$os_type" = "alpine" ] || [ "$os_ver" = "trixiesid" ]; then
500501
ipsec whack --shutdown || true
501502
fi
502503
sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh
@@ -519,8 +520,7 @@ jobs:
519520
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
520521
521522
for ver in 5.2 ""; do
522-
if [ "$os_type" = "alpine" ] \
523-
|| grep -qs trixie /etc/debian_version; then
523+
if [ "$os_type" = "alpine" ] || [ "$os_ver" = "trixiesid" ]; then
524524
ipsec whack --shutdown || true
525525
fi
526526
sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh

0 commit comments

Comments
 (0)