name: Run unit tests

on:
  pull_request:
    branches:
    - '*'
    types: [ "opened", "reopened", "synchronize" ]
  push:
    branches:
    - '*'
  workflow_dispatch: {}

jobs:
  test:
    container:
      image: docker.io/library/golang:1.24.3
    runs-on:
    - ubuntu-latest
    steps:
    - name: Install tooling
      run: |
        apt-get update --yes
        apt-get upgrade --yes
        apt-get install --yes git npm
    - uses: actions/checkout@v4
    - env:
        GOPROXY: ${{ vars.GOPROXY }}
        GONOSUMDB: ${{ vars.GONOSUMDB }}
      name: Execute containerized unit test
      run: make test