From 0b821f8a744231388c2547b76ee8e8622cce9078 Mon Sep 17 00:00:00 2001 From: Janik <10290002+led0nk@users.noreply.github.com> Date: Fri, 5 Apr 2024 00:32:04 +0200 Subject: [PATCH] wf --- .github/workflows/build-and-test.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a21bd0c..41400f0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -7,7 +7,7 @@ on: jobs: go-versions: - name: lookup Go versions + name: Lookup Go versions runs-on: ubuntu-latest outputs: matrix: ${{ steps.versions.outputs.matrix }} @@ -22,27 +22,29 @@ jobs: needs: [go-versions] steps: - uses: actions/checkout@v4 + - name: Set up Go - uses: actions/setup-go@v5 with: go-version: ${{ fromJSON(needs.go-versions.outputs.version) }} - - name: install gomods + - name: Install gomods run: make gomoddownload - - name: install tools + - name: Install tools run: make install-gotools lint: name: Lint runs-on: ubuntu-latest - needs: [setup-env] + needs: [setup-env,go-versions] steps: - uses: actions/checkout@v4 + - name: Set up Go - uses: actions/setup-go@v5 with: - go-version: "1.21.8" - - name: install gomods + go-version: ${{ fromJSON(needs.go-versions.outputs.version) }} + - name: Install gomods run: make gomoddownload - - name: install tools + - name: Install tools run: make install-gotools - - name: lint code + - name: Lint code run: make golint test: name: Test @@ -50,17 +52,17 @@ jobs: matrix: go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} runs-on: ubuntu-latest - needs: [go-versions] + needs: [setup-env,go-versions] steps: - uses: actions/checkout@v4 - - name: install Go + - name: Set up Go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - name: go test @version + - name: Test Go-version @version if: startsWith( matrix.go-version , needs.go-versions.outputs.version ) run: echo "test 1.21" - - name: go test @latest + - name: Test Go-version @latest if: startsWith( matrix.go-version , needs.go-versions.outputs.latest ) run: echo "test 1.22" build: