treewide: run clang-format #5471
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main, '*-branch'] | |
| jobs: | |
| changes-test: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| should-test: ${{ github.event_name == 'push' || steps.filter.outputs.src == 'true' }} | |
| steps: | |
| - uses: dorny/paths-filter@v4 | |
| if: github.event_name == 'pull_request' | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - '.github/actions/**' | |
| - '.github/workflows/test.yml' | |
| - 'cmake/**' | |
| - 'include/**' | |
| - 'lib/**' | |
| - 'platform/**' | |
| - 'resources/**' | |
| - 'sdk/**' | |
| - 'src/**' | |
| - 'stored_apps/**' | |
| - 'subsys/**' | |
| - 'tests/**' | |
| - 'third_party/**' | |
| - 'tools/**' | |
| build-test: | |
| needs: changes-test | |
| if: needs.changes-test.outputs.should-test == 'true' | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ghcr.io/coredevices/pebbleos-docker:v7 | |
| steps: | |
| - name: Mark Github workspace as safe | |
| run: git config --system --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Rebase onto target branch | |
| uses: ./.github/actions/rebase | |
| with: | |
| submodules: true | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -U pip | |
| pip install -r requirements.txt | |
| - name: Run tests | |
| # ctest runs the whole suite before reporting, so one failure does | |
| # not hide the rest. The job still fails if anything failed. | |
| run: pbl test | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v6 | |
| if: (!cancelled()) | |
| with: | |
| report_paths: build-test/junit.xml | |
| annotate_only: true | |
| detailed_summary: true | |
| - name: Store failed test images | |
| uses: actions/upload-artifact@v7 | |
| if: (!cancelled()) | |
| with: | |
| name: failed_test_images | |
| path: build-test/failed/ | |
| if-no-files-found: ignore | |
| test-status: | |
| needs: [changes-test, build-test] | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - if: needs.build-test.result == 'failure' || needs.build-test.result == 'cancelled' | |
| run: exit 1 |