|
| 1 | +name: Run Test Application (Linux Target on Host) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: {} |
| 5 | + workflow_dispatch: {} |
| 6 | +jobs: |
| 7 | + run-target: |
| 8 | + name: Run Test App on linux target on host |
| 9 | + runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + steps: |
| 13 | + - name: Checkout repository |
| 14 | + uses: actions/checkout@v4 |
| 15 | + - name: Download files / artifacts from build job |
| 16 | + uses: actions/download-artifact@v4 |
| 17 | + with: |
| 18 | + name: test_app_bin_linux |
| 19 | + path: test_app/build |
| 20 | + - name: Install Python packages for PyTest |
| 21 | + env: |
| 22 | + PIP_PREFER_BINARY: true |
| 23 | + PIP_INDEX_URL: "https://dl.espressif.com/pypi/" |
| 24 | + PIP_EXTRA_INDEX_URL: "https://pypi.org/simple" |
| 25 | + run: pip install -r test_app/requirements.txt |
| 26 | + - name: Run Test App on target |
| 27 | + working-directory: test_app |
| 28 | + run: | |
| 29 | + pytest \ |
| 30 | + --junit-xml=./test_app_results_linux.xml \ |
| 31 | + --embedded-services esp,idf \ |
| 32 | + --target=linux |
| 33 | + - name: Upload test results for publish-results job |
| 34 | + uses: actions/upload-artifact@v4 |
| 35 | + if: always() |
| 36 | + with: |
| 37 | + name: test_app_results_linux |
| 38 | + path: test_app/*.xml |
| 39 | + publish-results: |
| 40 | + name: Publish Test App results |
| 41 | + needs: run-target |
| 42 | + runs-on: ubuntu-20.04 |
| 43 | + if: always() # (run even if the previous steps have failed) |
| 44 | + steps: |
| 45 | + - name: Download Test results |
| 46 | + uses: actions/download-artifact@v4 |
| 47 | + with: |
| 48 | + path: test_results |
| 49 | + - name: Publish Test Results |
| 50 | + uses: EnricoMi/publish-unit-test-result-action@v2 |
| 51 | + with: |
| 52 | + files: test_results/**/*.xml |
0 commit comments