Skip to content

Use mise for sharing versions in CI and local dev #71

Use mise for sharing versions in CI and local dev

Use mise for sharing versions in CI and local dev #71

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mise-env: ['oldstable', 'stable']
env:
GO_NOT_LATEST: ${{ matrix.mise-env != 'stable' }}
MISE_ENV: ${{ matrix.mise-env }}
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Verify Go version
run: go version
- name: Build
run: mise run build
- name: Test
run: mise run test
- name: Verify golden files
if: env.GO_NOT_LATEST == 'false'
run: make diff-testdata
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: lint
run: mise run lint