name: Build + Test Mac-Windows

on:
  push:
    tags:
      - "*" # Push events to every tag
    branches:
      - main
      - dev
      - master

jobs:
  run_build_tests:
    name: build_tests
    runs-on: ${{ matrix.os }}
    env:
      GOPRIVATE: github.com/luxfi/*
      GONOSUMDB: github.com/luxfi/*
      CGO_ENABLED: "0"
      GOWORK: off
    strategy:
      matrix:
        # `macos-latest` currently resolves to GH-hosted arm64 macos (forbidden);
        # pin to `macos-13` (amd64). darwin/arm64 coverage lives in
        # build-macos-release.yml via cross-compile.
        os: [windows-latest, macos-13]
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup-go-for-project
      - name: Configure Git for private modules
        shell: bash
        run: git config --global url."https://${{ github.token }}@github.com/".insteadOf "https://github.com/"
      - name: build_test
        shell: bash
        run: .github/workflows/build_and_test.sh
