Skip to content

Commit

Permalink
wf
Browse files Browse the repository at this point in the history
  • Loading branch information
led0nk committed Apr 4, 2024
1 parent e66f724 commit 0b821f8
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -22,45 +22,47 @@ 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
strategy:
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:
Expand Down

0 comments on commit 0b821f8

Please sign in to comment.