pre-commit.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: pre-commit
  2. on:
  3. push:
  4. pull_request:
  5. branches: [ master ]
  6. concurrency:
  7. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. pre-commit:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Setup Python
  14. uses: actions/setup-python@v4
  15. with:
  16. python-version: '3.x'
  17. - name: Setup Ruby
  18. uses: ruby/setup-ruby@v1
  19. with:
  20. ruby-version: '3.0'
  21. - name: Checkout TinyUSB
  22. uses: actions/checkout@v3
  23. - name: Run codespell
  24. uses: codespell-project/actions-codespell@master
  25. - name: Run Unit Tests
  26. run: |
  27. # Install Ceedling
  28. gem install ceedling
  29. cd test/unit-test
  30. ceedling test:all
  31. - name: Fetch deps
  32. run: |
  33. fuzz_harness=$(ls -d test/fuzz/device/*/)
  34. for h in $fuzz_harness
  35. do
  36. make $h get-deps
  37. done
  38. - name: Build Fuzzer
  39. run: |
  40. fuzz_harness=$(ls -d test/fuzz/device/*/)
  41. for h in $fuzz_harness
  42. do
  43. make $h all
  44. done