name: K9s Checks

on:
  workflow_dispatch:
    push:
    branches:
      - master
    tags:
      - rc*
      - v*
  pull_request:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4.1.1

      - name: Install Go
        uses: actions/setup-go@v4.0.1
        with:
          go-version-file: go.mod
          cache-dependency-path: go.sum

      - name: Setup GO env
        run: go env -w CGO_ENABLED=0

      - name: Run Tests
        run: make test
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
