---
name: "Codestyle checks"

on:
  push:
    paths:
      - 'cmd/**'
      - 'internal/**'
      - 'webui.dev/**'
      - 'integration-tests/**'
      - 'OliveTin.proto'


jobs:
  codestyle:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version-file: 'service/go.mod'
          cache: true
          cache-dependency-path: 'service/go.mod'

      - name: Print go version
        run: go version

      - name: service
        run: make -wC service codestyle

      - name: frontend
        run: make -wC frontend codestyle
