diff --git a/.github/workflows/build_and_run_apps.yml b/.github/workflows/build_and_run_apps.yml index 9dfad5696a..1bc9b2c190 100644 --- a/.github/workflows/build_and_run_apps.yml +++ b/.github/workflows/build_and_run_apps.yml @@ -12,7 +12,12 @@ jobs: strategy: fail-fast: false matrix: - idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "latest"] + idf_ver: + # - "release-v5.0" + # - "release-v5.1" + # - "release-v5.2" + # - "release-v5.3" + - "latest" parallel_index: [1,2,3,4,5] # This must from 1 to 'parallel_count' defined in .idf_build_apps.toml runs-on: ubuntu-20.04 container: espressif/idf:${{ matrix.idf_ver }} @@ -52,9 +57,22 @@ jobs: strategy: fail-fast: false matrix: - idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "latest"] - idf_target: ["esp32"] - runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}"] + idf_ver: + - "release-v5.0" + - "release-v5.1" + - "release-v5.2" + - "release-v5.3" + - "latest" + runner: + - runs-on: "esp32" + marker: "generic" + target: "esp32" + # - runs-on: "ESP32-ETHERNET-KIT" + # marker: "ethernet" + # target: "esp32" + env: + TEST_RESULT_FILE: test_results_${{ matrix.runner_target }}_${{ matrix.runner.marker }}_${{ matrix.idf_ver }}.xml + runs-on: [self-hosted, linux, docker, "${{ matrix.runner.tag }}"] container: image: python:3.11-bookworm options: --privileged # Privileged mode has access to serial ports @@ -69,30 +87,26 @@ jobs: PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" run: pip install --prefer-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf - name: Run apps - run: pytest --target=${{ matrix.idf_target }} -m generic --build-dir=build_${{ matrix.idf_target }} --ignore=test_app + run: pytest --junit-xml=${{ env.TEST_RESULT_FILE }} --target=${{ matrix.idf_target }} -m ${{ matrix.runner.marker }} --build-dir=build_${{ matrix.idf_target }} --ignore=test_app + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test_results_${{ matrix.idf_ver }}_${{ matrix.idf_target }} + path: ${{ env.TEST_RESULT_FILE }} - run-ethernet-based-apps: - name: Run apps on ethernet runners - if: ${{ github.repository_owner == 'espressif' }} - needs: build - strategy: - fail-fast: false - matrix: - idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "latest"] - idf_target: ["esp32"] - runs-on: [self-hosted, ESP32-ETHERNET-KIT] - container: - image: python:3.11-bookworm - options: --privileged # Privileged mode has access to serial ports + publish-results: + name: Publish Test results + needs: + - run-target + if: ${{ always() && github.repository_owner == 'espressif' }} # Run even if the previous step failed + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - name: Download Test results + uses: actions/download-artifact@v4 with: - pattern: app_binaries_${{ matrix.idf_ver }}_* - merge-multiple: true - - name: Install Python packages - env: - PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" - run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf - - name: Run apps - run: pytest --target=${{ matrix.idf_target }} -m ethernet --build-dir=build_${{ matrix.idf_target }} --ignore=test_app + pattern: test_results_*.xml + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: test_results/**/*.xml diff --git a/.idf_build_apps.toml b/.idf_build_apps.toml index 0d8dd8b968..dcd8b4ecdc 100644 --- a/.idf_build_apps.toml +++ b/.idf_build_apps.toml @@ -1,4 +1,4 @@ -target = "all" +target = "esp32" # TEMPORARY paths = "." recursive = true exclude = [