diff --git a/.gitattributes b/.gitattributes index f593848..905d6d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,4 @@ *.sh text eol=lf Dockerfile text eol=lf *.yml text eol=lf +*.txt text eol=lf diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc7f042..398e639 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,12 +39,8 @@ jobs: - name: Build test image run: docker build -t restic-backup-docker:test . - - name: Install container-structure-test - run: | - curl -fsSL -o /usr/local/bin/container-structure-test \ - https://storage.googleapis.com/container-structure-test/v1.19.3/container-structure-test-linux-amd64 - chmod +x /usr/local/bin/container-structure-test - + # container-structure-test is not installed: test/run.sh falls back to + # the official tool image, which keeps CI and local runs identical. - name: Run test suites run: bash test/run.sh --no-build diff --git a/test/lib.sh b/test/lib.sh index 1541362..71d6fc1 100644 --- a/test/lib.sh +++ b/test/lib.sh @@ -190,7 +190,8 @@ REQUIRED_FEATURES_FILE="${REQUIRED_FEATURES_FILE:-$(dirname "${BASH_SOURCE[0]}") feature_is_required() { local feature="$1" [ -f "$REQUIRED_FEATURES_FILE" ] || return 1 - grep -v '^[[:space:]]*#' "$REQUIRED_FEATURES_FILE" 2>/dev/null \ + tr -d '\r' < "$REQUIRED_FEATURES_FILE" \ + | grep -v '^[[:space:]]*#' \ | grep -qx "[[:space:]]*${feature}[[:space:]]*" }