name: macOs

on:
  push:
    branches: [ "develop", "main" ]
  pull_request:
    branches: [ "develop", "main" ]

permissions:
  contents: read

jobs:

  build:
    runs-on: macos-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

    - name: Set up Go
      uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
      with:
        go-version: 1.23

    - name: Build
      run: go build -v ./...

    - name: Test
      run: go test -v ./...
      env:
        GODEBUG: x509sha1=1
        GOARCH: ${{ matrix.arch }}      
