diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 80427ab224..be11566f96 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -34,13 +34,25 @@ jobs: needs: lint steps: - - uses: actions/checkout@v2 + steps: + + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.20.5 - - name: Install Submodules - run: git submodule update --init --depth 1 --recursive + - name: Cache testdata + id: cache-testdata + uses: actions/cache@v3 + with: + path: | + tests/testdata + key: ${{ runner.os }}-testdata + + - name: Update git submodules + if: steps.cache-testdata.outputs.cache-hit != 'true' + run: + git submodule update --init --depth 1 --recursive - name: Test run: go run build/ci.go test -dlgo diff --git a/internal/build/gotool.go b/internal/build/gotool.go index a9e0bdf81e..b7cfcb08f2 100644 --- a/internal/build/gotool.go +++ b/internal/build/gotool.go @@ -144,7 +144,7 @@ func Version(csdb *ChecksumDB, version string) (string, error) { continue } if parts[0] == version { - parts[0] = strings.Trim(parts[0], "\r") + parts[0] = strings.Trim(strings.Trim(parts[0], "\r"), "\\r") log.Printf("Found version %q", parts[1]) return parts[1], nil }