Skip to content

fix: restore support and testing of Go 1.22.0 #303

fix: restore support and testing of Go 1.22.0

fix: restore support and testing of Go 1.22.0 #303

Workflow file for this run

name: Build and Test
on:
push:
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
env:
# GOOTOOLCHAIN=local tells Go to only use the installed Go version (from the
# build matrix) rather than immediately upgrading to whatever is specified by
# the `toolchain` directive in `go.mod`. This ensures that the build matrix
# versions (stable and oldstable) are actually being validated.
GOTOOLCHAIN: local
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [stable, oldstable]
os: [ubuntu-latest, windows-latest]
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Build and Test (Linux and macOS)
run: ./scripts/ci.sh
if: ${{ matrix.os != 'windows-latest' }}
- name: Build and Test (Windows)
run: .\scripts\ci.ps1
if: ${{ matrix.os == 'windows-latest' }}