|
4 | 4 | types: [opened, synchronize, labeled, unlabeled] |
5 | 5 | paths: |
6 | 6 | - 'drivers/**' |
| 7 | + - 'tools/run_driver_tests.py' |
| 8 | + - 'tools/run_driver_tests_p.py' |
7 | 9 |
|
8 | 10 | jobs: |
9 | 11 | # Two separate jobs for finding the right artifact to run tests with |
@@ -91,11 +93,33 @@ jobs: |
91 | 93 | - run: echo ${{ steps.changed-drivers.outputs.all_modified_files }} |
92 | 94 | - name: Install Python requirements |
93 | 95 | run: pip install -r tools/requirements.txt |
| 96 | + - name: Fetch capability definitions |
| 97 | + continue-on-error: true |
| 98 | + run: | |
| 99 | + python3 tools/fetch_capability_definitions.py \ |
| 100 | + --drivers-dir ${{ github.workspace }}/drivers \ |
| 101 | + --output-dir ${{ github.workspace }}/capability_json \ |
| 102 | + --failed-output-file ${{ github.workspace }}/capability_failures_comment.md |
| 103 | + env: |
| 104 | + CAPABILITY_PAT: ${{ secrets.CAPABILITY_DEFINITIONS_PAT }} |
| 105 | + - name: Report capability download failures |
| 106 | + if: hashFiles('capability_failures_comment.md') != '' && always() |
| 107 | + uses: marocchino/sticky-pull-request-comment@v2 |
| 108 | + with: |
| 109 | + path: ${{ github.workspace }}/capability_failures_comment.md |
| 110 | + header: capability-download-failures |
| 111 | + - name: Clear capability download failures comment |
| 112 | + if: hashFiles('capability_failures_comment.md') == '' && always() |
| 113 | + uses: marocchino/sticky-pull-request-comment@v2 |
| 114 | + with: |
| 115 | + header: capability-download-failures |
| 116 | + delete: true |
94 | 117 | - name: Run the tests |
95 | 118 | id: run-tests |
96 | 119 | run: python tools/run_driver_tests_p.py ${{ steps.changed-drivers.outputs.all_modified_files }} |
97 | 120 | env: |
98 | 121 | LUA_PATH: ${{ steps.lua_path.outputs.lua_path }} |
| 122 | + ST_CAPABILITY_JSON_DIR: ${{ github.workspace }}/capability_json |
99 | 123 | - name: Upload test artifact |
100 | 124 | if: always() |
101 | 125 | uses: actions/upload-artifact@v4 |
|
0 commit comments