---
name: "Codestyle checks"

on:
  push:
    paths:
      - '.github/workflows/codestyle.yml'
      - 'frontend/**'
      - 'integration-tests/**'
      - 'proto/**'
      - 'service/**'


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: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '22'

      - name: frontend
        run: make -wC frontend codestyle
