scripts.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # https://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing,
  13. # software distributed under the License is distributed on an
  14. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. # KIND, either express or implied. See the License for the
  16. # specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. # This workflow enforces quality checks on bash scripts in the project
  20. name: ScriptQA
  21. on:
  22. push:
  23. branches: [ '*' ]
  24. pull_request:
  25. branches: [ '*' ]
  26. permissions:
  27. contents: read
  28. jobs:
  29. shfmt:
  30. name: shfmt
  31. timeout-minutes: 3
  32. runs-on: ubuntu-latest
  33. steps:
  34. - uses: actions/checkout@v4
  35. - name: Show the first log message
  36. run: git log -n1
  37. - name: Install shfmt
  38. run: tools/ci/install-shfmt.sh
  39. - name: Checking formatting of all scripts
  40. run: tools/ci/run-shfmt.sh
  41. shellcheck:
  42. name: ShellCheck
  43. timeout-minutes: 3
  44. runs-on: ubuntu-latest
  45. steps:
  46. - uses: actions/checkout@v4
  47. - name: Show the first log message
  48. run: git log -n1
  49. - name: Install shfmt
  50. run: tools/ci/install-shfmt.sh
  51. - name: Running shellcheck on all scripts
  52. run: tools/ci/run-shellcheck.sh