diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11e1b7d..a41d4bb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,6 @@ name: Tests and Build on: push: - branches: [ "*" ] tags: [ "v*" ] pull_request: branches: [ main ] @@ -59,7 +58,7 @@ jobs: - kalilinux - alpine - centos - - quay.io/centos/centos:stream9 + - quay.io/centos/centos:stream steps: - name: Checkout @@ -102,13 +101,13 @@ jobs: strategy: matrix: image: - - alpine:3.17 - - ubuntu:20.04 + - alpine:3.23 - ubuntu:22.04 - - debian:10 - - debian:11 + - ubuntu:24.04 + - debian:12 + - debian:13 - centos:8 - - quay.io/centos/centos:stream9 + - quay.io/centos/centos:stream10 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/config_test.go b/config_test.go index 7189a2b..9b8f826 100644 --- a/config_test.go +++ b/config_test.go @@ -68,10 +68,6 @@ func TestConfig(t *testing.T) { image string config Config }{ - { - image: "ubuntu:18.04", - config: configDebian, - }, { image: "ubuntu:20.04", config: configUbuntu, @@ -80,22 +76,26 @@ func TestConfig(t *testing.T) { image: "ubuntu:22.04", config: configUbuntu, }, + { + image: "ubuntu:24.04", + config: configUbuntu, + }, { image: "ubuntu:latest", config: configUbuntu, }, - { - image: "debian:9", - config: configDebian, - }, - { - image: "debian:10", - config: configDebian, - }, { image: "debian:11", config: configDebian, }, + { + image: "debian:12", + config: configDebian, + }, + { + image: "debian:13", + config: configDebian, + }, { image: "debian:latest", config: configDebian, @@ -105,7 +105,7 @@ func TestConfig(t *testing.T) { config: configDebian, }, { - image: "alpine:3.16", + image: "alpine:3.20", config: configAlpine, }, { @@ -120,6 +120,10 @@ func TestConfig(t *testing.T) { image: "quay.io/centos/centos:stream9", config: configCentOS, }, + { + image: "quay.io/centos/centos:stream10", + config: configCentOS, + }, } exec.SetDebug(true) diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 77b5497..dda5ba0 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -47,13 +47,13 @@ type img struct { var ( images = []img{ - {name: "alpine:3.17", luks: "Enter passphrase for /dev/sda2:"}, - {name: "ubuntu:20.04", luks: "Please unlock disk root:"}, + {name: "alpine:3.23", luks: "Enter passphrase for /dev/sda2:"}, {name: "ubuntu:22.04", luks: "Please unlock disk root:"}, - {name: "debian:10", luks: "Please unlock disk root:"}, - {name: "debian:11", luks: "Please unlock disk root:"}, + {name: "ubuntu:24.04", luks: "Please unlock disk root:"}, + {name: "debian:12", luks: "Please unlock disk root:"}, + {name: "debian:13", luks: "Please unlock disk root:"}, {name: "centos:8", luks: "Please enter passphrase for disk"}, - {name: "quay.io/centos/centos:stream9", luks: "Please enter passphrase for disk"}, + {name: "quay.io/centos/centos:stream10", luks: "Please enter passphrase for disk"}, } imgNames = func() []string { var imgs []string @@ -147,6 +147,8 @@ imgs: login := []byte("login:") password := []byte("Password:") s := bufio.NewScanner(outr) + // fix failed to scan output: bufio.Scanner: token too long + s.Buffer(make([]byte, 0, 64*1024), 10*1024*1024) s.Split(func(data []byte, atEOF bool) (advance int, token []byte, err error) { if i := bytes.Index(data, []byte(img.luks)); i >= 0 { return i + len(img.luks), []byte(img.luks), nil diff --git a/templates/alpine.Dockerfile b/templates/alpine.Dockerfile index fb03bdf..540bfb8 100644 --- a/templates/alpine.Dockerfile +++ b/templates/alpine.Dockerfile @@ -46,5 +46,5 @@ RUN apk add --no-cache \ {{- if .GrubEFI }} grub-efi \ {{- end }} - grub + grub || true {{- end }}