Skip to content

fix(deps): update go deps #1429

fix(deps): update go deps

fix(deps): update go deps #1429

Workflow file for this run

name: Go Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
matrix:
# No windows-latest: its native MinGW GCC can't compile the WebRTC APM
# C++ (clang-only SEH __try/__except). Windows is built+validated by the
# zig cross-build in build.yaml; the audio packages have no unit tests.
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
# pkg/portaudio/pa_src is a submodule with the vendored PortAudio C
# source; needed now that console (cgo) builds unconditionally.
submodules: true
- name: Install ALSA headers (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- name: Download Go modules
run: go mod download
- name: Lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: v2.11.4
- name: Test
shell: bash
run: |
set -euo pipefail
go test -race -json -v ./... 2>&1 | tee test.log
- name: Verify fish_autocomplete is up to date
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
go build -o /tmp/lk ./cmd/lk
/tmp/lk generate-fish-completion -o /tmp/fish_autocomplete.fresh
if ! diff -u autocomplete/fish_autocomplete /tmp/fish_autocomplete.fresh; then
echo "::error::autocomplete/fish_autocomplete is stale; regenerate with:"
echo " go build -o /tmp/lk ./cmd/lk && /tmp/lk generate-fish-completion -o autocomplete/fish_autocomplete"
exit 1
fi
- name: Upload test log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: test-log-${{ matrix.os }}
path: test.log
if-no-files-found: warn