test(hw): wire Talise profile + radio_on into ADRV9009 ZC706 DMA test #412
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 and Build Package | |
| permissions: | |
| contents: read | |
| # `dorny/test-reporter` creates a GitHub Check Run per pytest | |
| # matrix leg with the per-test detail from the JUnit XML. | |
| checks: write | |
| pull-requests: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| python-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| name: Test Python ${{ matrix.python-version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[test]" | |
| - name: Run tests with pytest | |
| run: | | |
| pytest -vs --junitxml=junit-py${{ matrix.python-version }}.xml | |
| - name: Upload JUnit XML | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: junit-py${{ matrix.python-version }} | |
| path: junit-py${{ matrix.python-version }}.xml | |
| retention-days: 14 | |
| if-no-files-found: warn | |
| - name: Publish test results to PR | |
| if: always() | |
| uses: dorny/test-reporter@v1 | |
| with: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| path: junit-py${{ matrix.python-version }}.xml | |
| reporter: java-junit | |
| fail-on-error: false | |
| publish-pr-test-summary: | |
| name: PR Test Summary | |
| needs: python-test | |
| if: always() && github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: junit-py* | |
| path: junit | |
| merge-multiple: true | |
| - uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: 'junit/**/*.xml' | |
| check_name: 'Unit Test Results' | |
| comment_mode: always | |
| report_individual_runs: true | |
| build-package: | |
| needs: [python-test] | |
| runs-on: ubuntu-latest | |
| name: Build Package for PyPI | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine wheel setuptools | |
| - name: Build source and wheel distribution | |
| run: | | |
| python -m build --sdist --wheel | |
| - name: Check built distributions | |
| run: | | |
| python -m twine check dist/* | |
| - name: Test installation from wheel | |
| run: | | |
| pip install dist/*.whl | |
| python -c "import adidt; print('Package installed successfully')" | |
| # Test CLI if available | |
| adidtc --help | |
| - name: Upload PyPI artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pypi-distributions | |
| path: dist/ | |
| retention-days: 90 | |
| - name: Upload individual source distribution | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: source-distribution | |
| path: dist/*.tar.gz | |
| retention-days: 90 | |
| - name: Upload individual wheel distribution | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: wheel-distribution | |
| path: dist/*.whl | |
| retention-days: 90 |