From 05d29e12569a5dd9a21def31295ddb3161404053 Mon Sep 17 00:00:00 2001 From: Jan Delgado Date: Sat, 19 Aug 2023 09:49:46 +0200 Subject: [PATCH 1/2] fix gitlab ci cache (setup-go) --- .github/workflows/test_and_build.yml | 15 ++++++--------- .github/workflows/upload_assets.yml | 6 +++--- go.mod | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 25a2681..81b1b64 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -11,12 +11,12 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.20.x - - name: Checkout code - uses: actions/checkout@v3 + go-version: 1.21.x - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -32,13 +32,12 @@ jobs: matrix: goversion: ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Install Go - if: success() uses: actions/setup-go@v4 with: go-version: ${{ matrix.goversion }} - - name: Checkout code - uses: actions/checkout@v3 - name: Run tests run: | go version @@ -52,7 +51,6 @@ jobs: testversion: ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] steps: - name: Install Go - if: success() uses: actions/setup-go@v4 with: go-version: ${{ matrix.buildversion }} @@ -63,7 +61,6 @@ jobs: go version GO111MODULE=on make build-linux - name: Install Go - if: success() uses: actions/setup-go@v4 with: go-version: ${{ matrix.testversion }} @@ -81,7 +78,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.21 + go-version: 1.21.x - name: build run: | go version diff --git a/.github/workflows/upload_assets.yml b/.github/workflows/upload_assets.yml index 8be80b6..4d22f78 100644 --- a/.github/workflows/upload_assets.yml +++ b/.github/workflows/upload_assets.yml @@ -8,12 +8,12 @@ jobs: name: build binaries runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.20.x - - name: Checkout code - uses: actions/checkout@v3 + go-version: 1.21.x - name: build run: | make build diff --git a/go.mod b/go.mod index 0483010..e894ea9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jandelgado/gcov2lcov -go 1.19 +go 1.15 require github.com/stretchr/testify v1.8.1 From 42b1fac8412faa94ea2b0d2ddcf9d7f0ca3616e0 Mon Sep 17 00:00:00 2001 From: Jan Delgado Date: Sat, 19 Aug 2023 09:58:42 +0200 Subject: [PATCH 2/2] fix order --- .github/workflows/test_and_build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 81b1b64..4908949 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -50,17 +50,17 @@ jobs: buildversion: ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] testversion: ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] steps: - - name: Install Go + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Go to build artifact uses: actions/setup-go@v4 with: go-version: ${{ matrix.buildversion }} - - name: Checkout code - uses: actions/checkout@v3 - - name: Build binary for inttest + - name: Build artifact for inttest run: | go version GO111MODULE=on make build-linux - - name: Install Go + - name: Install Go for inttest uses: actions/setup-go@v4 with: go-version: ${{ matrix.testversion }}