name: test
on:
  push:
    paths-ignore:
      - docs/**
    branches:
      - main
  pull_request:
    paths-ignore:
      - docs/**
    branches:
      - main

jobs:
  test:
    runs-on: buildjet-4vcpu-ubuntu-2004
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: actions/setup-go@v3
        with:
          go-version: "1.19"
      - uses: debianmaster/actions-k3s@v1.0.5
        with:
          version: 'v1.23.6-k3s1'
      - run: make validate-ci
      - run: make validate
      - run: make build
      - run: docker buildx install
      - run: make setup-ci-image
      - run: ./bin/acorn install --image acorn:v-ci --skip-checks --acorn-dns=disabled
      - run: TEST_ACORN_CONTROLLER=external make test
