Skip to content

Support transient and config assistants with call-out functionality #61

Support transient and config assistants with call-out functionality

Support transient and config assistants with call-out functionality #61

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ["1.23", "1.24.4"]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install PortAudio (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y portaudio19-dev
- name: Install PortAudio (macOS)
if: runner.os == 'macOS'
run: brew install portaudio
- name: Install PortAudio (Windows)
if: runner.os == 'Windows'
run: |
vcpkg install portaudio:x64-windows
echo "PKG_CONFIG_PATH=C:/vcpkg/installed/x64-windows/lib/pkgconfig" >> $env:GITHUB_ENV
echo "CGO_CFLAGS=-IC:/vcpkg/installed/x64-windows/include" >> $env:GITHUB_ENV
echo "CGO_LDFLAGS=-LC:/vcpkg/installed/x64-windows/lib -lportaudio" >> $env:GITHUB_ENV
# Add DLL directory to PATH so tests can find portaudio.dll at runtime
echo "C:/vcpkg/installed/x64-windows/bin" >> $env:GITHUB_PATH
- name: Download dependencies
run: go mod download
- name: Run tests (Unix)
if: runner.os != 'Windows'
run: go test -v -race -coverprofile=coverage.out ./...
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: go test -v -race "-coverprofile=coverage.out" ./...
- name: Upload coverage
uses: codecov/codecov-action@v5
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.24.4'
with:
file: ./coverage.out
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24.4"
- name: Install PortAudio
run: sudo apt-get update && sudo apt-get install -y portaudio19-dev
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: latest
args: --timeout=5m
build:
name: Build
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24.4"
- name: Install PortAudio
run: sudo apt-get update && sudo apt-get install -y portaudio19-dev
- name: Build
run: make build
- name: Test binary
run: ./build/vapi --version