# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
  pull_request:
    branches: [ "master" ]

jobs:

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Set up Go
      uses: actions/setup-go@v4
      with:
        go-version: '1.22'
    - name: mod tidy
      run: go mod tidy
    - name: Build
      run: go build  -v -o release/apimain cmd/apimain.go

    - name: Test
      run: go test -v  cmd/apimain.go   
