format.yaml 921 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: format
  2. on:
  3. push:
  4. branches: '**'
  5. pull_request:
  6. branches:
  7. - 'master'
  8. - 'rolling'
  9. jobs:
  10. stylua-check:
  11. name: "Formatting check with Stylua"
  12. runs-on: ubuntu-20.04
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Prepare dependencies
  16. run: |
  17. sudo apt install -y curl unzip --no-install-recommends
  18. bash ./utils/installer/install_stylua.sh
  19. - name: Check formatting
  20. run: |
  21. ./utils/stylua --config-path .stylua.toml -c .
  22. shfmt-check:
  23. name: "Formatting check with shfmt"
  24. runs-on: ubuntu-20.04
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Setup Go
  28. uses: actions/setup-go@v2
  29. with:
  30. go-version: '1.16'
  31. - name: Use shfmt
  32. run: |
  33. GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
  34. - name: Check formatting
  35. run: |
  36. shfmt -l -d .