Skip to content

Commit

Permalink
chore: update all goversion to goversionfile (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Sep 19, 2024
1 parent 04e312a commit 0858852
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 36 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
- main
# Trigger on version tags
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-rc(?:[0-9]+|\.[0-9]+)'
- "v*"
pull_request:
merge_group:
workflow_dispatch:
Expand All @@ -24,29 +23,11 @@ on:
- major

jobs:
setup:
runs-on: ubuntu-latest
env:
# use consistent go version throughout pipeline here
GO_VERSION: "1.21"
outputs:
go-version: ${{ steps.set-vars.outputs.go-version }}
steps:
- name: Set go version
id: set-vars
run: echo "go-version=${{env.GO_VERSION}}" >> "$GITHUB_OUTPUT"

lint:
needs: [setup]
uses: ./.github/workflows/lint.yml
with:
go-version: ${{ needs.setup.outputs.go-version }}

test:
needs: [setup]
uses: ./.github/workflows/test.yml
with:
go-version: ${{ needs.setup.outputs.go-version }}

proto:
uses: ./.github/workflows/proto.yml
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
name: lint
on:
workflow_call:
inputs:
go-version:
description: 'Go version to use'
type: string
required: true

jobs:
golangci-lint:
Expand All @@ -17,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version-file: go.mod
# This steps sets the GIT_DIFF environment variable to true
# if files defined in PATTERS changed
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -55,6 +50,6 @@ jobs:
- name: set up go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: go.mod
- run: make proto-gen
- run: make proto-lint
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: go.mod
- name: "Check protobuf generated code matches committed code"
# yamllint disable
run: |
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
name: Tests / Code Coverage
on:
workflow_call:
inputs:
go-version:
description: "Go version to use"
type: string
required: true

jobs:
go_mod_tidy_check:
Expand All @@ -17,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version-file: go.mod
- run: go mod tidy
- name: check for diff
run: git diff --exit-code
Expand All @@ -30,7 +25,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version-file: go.mod
- name: Run unit test
run: make test
- name: upload coverage report
Expand All @@ -47,6 +42,6 @@ jobs:
- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version-file: go.mod
- name: Integration Tests
run: echo "No integration tests yet"

0 comments on commit 0858852

Please sign in to comment.