checks.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: Perform checks
  2. on:
  3. pull_request:
  4. branches: [ mirror/master ]
  5. paths:
  6. - '**'
  7. - '!.github/**'
  8. - '!*.yml'
  9. - '!*.config'
  10. - '!*.md'
  11. - '.github/workflows/*.yml'
  12. permissions:
  13. pull-requests: write
  14. checks: write
  15. concurrency:
  16. group: pr-checks-${{ github.event.number }}
  17. cancel-in-progress: true
  18. jobs:
  19. format:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v4
  23. with:
  24. fetch-depth: 0
  25. - uses: actions/setup-dotnet@v4
  26. with:
  27. global-json-file: global.json
  28. - name: Overwrite csc problem matcher
  29. run: echo "::add-matcher::.github/csc.json"
  30. - run: dotnet restore
  31. - name: Print dotnet format version
  32. run: dotnet format --version
  33. - name: Run dotnet format whitespace
  34. run: |
  35. dotnet format whitespace --verify-no-changes --report ./whitespace-report.json -v d
  36. # For some unknown reason this step sometimes fails with exit code 139 (segfault?),
  37. # so in that case we'll try again (3 tries max).
  38. - name: Run dotnet format style
  39. uses: ryujinx-mirror/unstable-commands@releases/v1.0.6
  40. with:
  41. commands: dotnet format style --severity info --verify-no-changes --report ./style-report.json -v d
  42. timeout-minutes: 5
  43. retry-codes: 139
  44. - name: Run dotnet format analyzers
  45. uses: ryujinx-mirror/unstable-commands@releases/v1.0.6
  46. with:
  47. commands: dotnet format analyzers --severity info --verify-no-changes --report ./analyzers-report.json -v d
  48. timeout-minutes: 5
  49. retry-codes: 139
  50. - name: Upload report
  51. if: failure()
  52. uses: actions/upload-artifact@v4
  53. with:
  54. name: dotnet-format
  55. path: ./*-report.json
  56. pr_build:
  57. uses: ./.github/workflows/build.yml
  58. needs: format
  59. secrets: inherit