name: Misc Tests

on:
  push:
    branches:
      - master
      - '[5-9]+.[0-9]+.x'
  pull_request:
    branches:
      - master
      - '[5-9]+.[0-9]+.x'

jobs:
  build:
    name: Misc tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '2.6'
          bundler-cache: false # runs 'bundle install' and caches installed gems automatically
      - name: Detect tabs
        run: /bin/bash ./bin/utils/detect_tab_in_templates.sh
      - name: Detect changes in test files
        run: ./bin/utils/detect_test_file_changes.rb bin/utils/test_file_list.yaml
      - name: Detect carriage return
        run: /bin/bash ./bin/utils/detect_carriage_return.sh
      - name: Detect merge conflicts
        run: /bin/bash ./bin/utils/detect_merge_conflict.sh
      - name: Detect tabs
        run: /bin/bash ./bin/utils/detect_tab_in_java_class.sh
