From dd84dbb59e9943ea0de95385dbd821c75dd0a17b Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Wed, 18 Dec 2024 01:01:20 +0200 Subject: [PATCH 1/2] Make CI fail on go compilation errors --- .github/workflows/toolkit.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/toolkit.yml b/.github/workflows/toolkit.yml index 701b6eebd..05f43c33d 100644 --- a/.github/workflows/toolkit.yml +++ b/.github/workflows/toolkit.yml @@ -15,14 +15,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.22' + - name: Build - run: cd src/go; make linux-amd64; cd ../../ + working-directory: src/go + run: make linux-amd64 - name: Build the Docker image run: echo "FROM oraclelinux:9-slim" > Dockerfile; echo "RUN microdnf -y update" >> Dockerfile; echo "COPY bin/* /usr/bin/" >> Dockerfile; docker build . --file Dockerfile --tag percona-toolkit:${{ github.sha }} From a88b99e9c80452367fae1749401f6471c3686628 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Wed, 18 Dec 2024 01:04:02 +0200 Subject: [PATCH 2/2] Break code to check CI failure --- src/go/pt-secure-collect/encrypt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/pt-secure-collect/encrypt.go b/src/go/pt-secure-collect/encrypt.go index 07c834dee..1ae00f183 100644 --- a/src/go/pt-secure-collect/encrypt.go +++ b/src/go/pt-secure-collect/encrypt.go @@ -22,7 +22,7 @@ func encryptorCmd(opts *cliOptions) (err error) { *opts.DecryptOutFile = strings.TrimSuffix(filepath.Base(*opts.DecryptInFile), ".aes") } log.Infof("Decrypting file %q into %q", *opts.DecryptInFile, *opts.DecryptOutFile) - err = decrypt(*opts.DecryptInFile, *opts.DecryptOutFile, password) + err = decrypt(*opts.DecryptInFile, *opts.DecryptOutFile, password case "encrypt": if *opts.EncryptOutFile == "" { *opts.EncryptOutFile = filepath.Base(*opts.EncryptInFile) + ".aes"