name: 🔨 Build Test

on:
  pull_request:
    paths:
      - '**.go'
      - '**.mod'
  push:
    branches:
      - main
      - master
  workflow_dispatch:

jobs:
  build:
    name: Test Builds
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-12]
        go-version: [1.21.x]
    steps:
      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version: ${{ matrix.go-version }}

      - name: Check out code
        uses: actions/checkout@v3

      - name: Build
        run: go build .
        working-directory: cmd/machineid/

      - name: Test
        run: go test ./...
        working-directory: .
        

      
