Skip to content

chore: Bump go-tools image to v1.1.0 (#77) #30

chore: Bump go-tools image to v1.1.0 (#77)

chore: Bump go-tools image to v1.1.0 (#77) #30

Workflow file for this run

name: Lint & Test & Build & Release
on:
push:
tags:
- 'v*'
branches:
- "!*"
jobs:
build:
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.21' ]
runs-on: ${{ matrix.os }}
name: Build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up go
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
- 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: Build
run: |
make build
regression_test:
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.21' ]
runs-on: ${{ matrix.os }}
name: Regression tests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up go
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
- 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: Run regression tests
env:
AOC_SESSION: ${{ secrets.AOC_SESSION }}
run: |
make test-regression
shell: bash
linting:
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.21' ]
runs-on: ${{ matrix.os }}
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up go
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
- 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: Vet
run: |
make vet
shell: bash
- name: Lint
run: |
make lint-pipeline
shell: bash
release:
needs: [ build, regression_test, linting ]
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.21' ]
runs-on: ${{ matrix.os }}
name: Release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up go
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
- run: |
go version
shell: bash
- name: Run GoReleaser
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make release
shell: bash