format.yaml 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: format
  2. on:
  3. pull_request:
  4. branches:
  5. - "rolling"
  6. jobs:
  7. stylua-check:
  8. name: "Formatting check with Stylua"
  9. runs-on: ubuntu-20.04
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Lint with stylua
  13. uses: JohnnyMorganz/stylua-action@1.0.0
  14. with:
  15. token: ${{ secrets.GITHUB_TOKEN }}
  16. # CLI arguments
  17. args: --check .
  18. shfmt-check:
  19. name: "Formatting check with shfmt"
  20. runs-on: ubuntu-20.04
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Go
  24. uses: actions/setup-go@v2
  25. with:
  26. go-version: "1.16"
  27. - name: Use shfmt
  28. run: |
  29. GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
  30. # https://google.github.io/styleguide/shellguide.html
  31. - name: Check formatting
  32. run: make style-sh