Skip to content

chore: Bump go-tools to 1.3.0 #232

chore: Bump go-tools to 1.3.0

chore: Bump go-tools to 1.3.0 #232

Workflow file for this run

name: Go [lint, test]
on:
workflow_dispatch:
push:
branches:
- 'master'
paths:
- 'scripts/**'
- '**/*.go'
- '**/*.gohtml'
- '**/*.gotmpl'
- '**/*.proto'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '!**.*md'
- '.github/workflows/**'
- 'deployments/docker-compose/go-tools-docker-compose.yml'
- 'build/docker/go-tools/**'
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- '*'
paths:
- 'scripts/**'
- '**/*.go'
- '**/*.gohtml'
- '**/*.gotmpl'
- '**/*.proto'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '!**.*md'
- '.github/workflows/**'
- 'deployments/docker-compose/go-tools-docker-compose.yml'
- 'build/docker/go-tools/**'
jobs:
build:
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
- name: Set up cache
uses: actions/cache@v3
env:
cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }}
with:
path: |
${{ env.GOBIN }}
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
- name: Build
run: |
make build
shell: bash
- name: Check release
run: |
make check-releaser
shell: bash
testing:
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
name: Run Tests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
- name: Set up cache
uses: actions/cache@v3
env:
cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }}
with:
path: |
${{ env.GOBIN }}
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
- name: Install tools
run: |
make install-tools
shell: bash
- name: Test
run: |
make test
shell: bash
linting:
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
name: Run linters
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
- name: Vet
run: |
make vet
shell: bash
- name: Set up cache
uses: actions/cache@v3
env:
cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }}
with:
path: |
${{ env.GOBIN }}
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
- name: Install tools
run: |
make install-tools
shell: bash
- name: Lint
run: |
make lint-pipeline
shell: bash
reports:
needs: [ testing, linting, build ]
strategy:
fail-fast: true
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
name: Quality reports
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
- name: Set up cache
uses: actions/cache@v3
env:
cache-name: cache-vendored-tools-${{ secrets.CACHE_VERSION }}
with:
path: |
${{ env.GOBIN }}
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
- name: Install tools
run: |
make install-tools
shell: bash
- name: Prepare test coverage and reports
run: |
make prepare-cover-report
shell: bash
- name: Prepare lint report
run: |
make lint-sonar
shell: bash
- name: Cover report upload
if: success()
run: |
bash <(curl -s https://codecov.io/bash) -f ./coverage/full.cov
shell: bash
- name: SonarCloud report upload
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}