From 2e9ff5863f7e60d9049840295a9ace3edd429b36 Mon Sep 17 00:00:00 2001 From: Thomas Fossati Date: Tue, 21 May 2024 11:00:42 +0200 Subject: [PATCH] fix CI problem related to (missing) golang installation Signed-off-by: Thomas Fossati --- .github/workflows/ci-go-cover.yml | 3 --- .github/workflows/ci.yml | 11 +++++------ .github/workflows/linters.yml | 4 +--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-go-cover.yml b/.github/workflows/ci-go-cover.yml index 66f69e8..1a58bd9 100644 --- a/.github/workflows/ci-go-cover.yml +++ b/.github/workflows/ci-go-cover.yml @@ -20,8 +20,6 @@ jobs: cover: name: Coverage runs-on: ubuntu-latest - env: - GO111MODULE: on steps: - uses: actions/setup-go@v3 with: @@ -32,5 +30,4 @@ jobs: run: | go version make test-cover | grep -o "coverage:.*of statements$" | python scripts/cov.py - shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0820f03..27313a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,15 +12,14 @@ jobs: matrix: os: [macos-latest, ubuntu-latest] steps: + - uses: actions/setup-go@v3 + with: + go-version: "1.18" - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: fetch-depth: 1 - - name: Get dependencies - run: go get -v -t -d ./... - - name: Build project - run: go build ./... - name: Run tests run: | go version - go test -short -race -v ./... + make test diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index e6666b7..17cf97a 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -5,8 +5,6 @@ jobs: lint: name: Lint runs-on: ubuntu-latest - env: - GO111MODULE: on steps: - uses: actions/setup-go@v3 with: @@ -18,4 +16,4 @@ jobs: go version curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.2 - name: Run required linters in .golangci.yml plus hard-coded ones here - run: make -w GOLINT=$(go env GOPATH)/bin/golangci-lint lint + run: make lint