name: golangci-lint
on:
  push:
    paths:
      - 'go/gas-oracle/**'
      - 'go/batch-submitter/**'
    branches:
      - 'master'
      - 'develop'
      - '*rc'
      - 'regenesis/*'
  pull_request:
    paths:
      - 'go/gas-oracle/**'
      - 'go/batch-submitter/**'
jobs:
  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: golangci-lint gas-oracle
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.29
          working-directory: go/gas-oracle
      - name: golangci-lint batch-submitter
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.29
          working-directory: go/batch-submitter
