Skip to content

chore: Upgrade Go version to 1.23 #108

chore: Upgrade Go version to 1.23

chore: Upgrade Go version to 1.23 #108

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
get-go-version:
runs-on: ubuntu-latest
outputs:
go-version: ${{ steps.read-go-version.outputs.version }}
steps:
- uses: actions/checkout@v2
- id: read-go-version
name: Determine Go version from go.mod
run: echo "::set-output name=version::$(grep "go 1." go.mod | cut -d " " -f 2)"
golangci-lint:
runs-on: ubuntu-latest
needs:
- get-go-version
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- id: get-golangci-lint-version
name: Get golangci-lint version
run: echo "GOLANGCI_LINT_VERSION=$(grep '^GOLANGCI_LINT_VERSION' Makefile | cut -d' ' -f3)" >> "$GITHUB_OUTPUT"
- name: Run golangci-lint
uses: golangci/[email protected]
with:
version: ${{ steps.get-golangci-lint-version.outputs.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
generate-lint:
runs-on: ubuntu-latest
needs:
- get-go-version
# NOTE(irvinlim): Need to operate in GOPATH in order for generate-groups.sh to succeed (see Makefile).
steps:
- uses: actions/checkout@v2
with:
path: "go/src/github.com/${{ github.repository }}"
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: Generate code
run: make generate && make manifests
env:
GOPATH: /home/runner/work/furiko/go
working-directory: "go/src/github.com/${{ github.repository }}"
- name: Check for differences
run: git add . && git diff --exit-code --staged
working-directory: "go/src/github.com/${{ github.repository }}"
license-header-lint:
runs-on: ubuntu-latest
needs:
- get-go-version
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: make lint-license
go-test:
strategy:
matrix:
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
needs:
- get-go-version
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: Run tests
run: make test
- name: Push code coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./combined.cov
# Push code coverage only for one of the environments
if: matrix.platform == 'ubuntu-latest'