name: 🔨 Build Test

on:
  pull_request:
  workflow_dispatch:

jobs:  
  build:
    name: Test Builds
    runs-on: ubuntu-latest-16-cores
    steps:
      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version: 1.21.x

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

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

      - name: Example Code Tests
        run: go build .
        working-directory: examples/

      - name: Run test
        run: go test ./...
        env:
          PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
