From c8a6c4a8e0368c14ff9782f8963aa2adeaf88945 Mon Sep 17 00:00:00 2001 From: Pornpipat Popum Date: Mon, 17 Nov 2025 07:08:11 +0700 Subject: [PATCH] ci: Add metainfo tests (#7400) * ci: Add metainfo tests closes #7399 * bump xpadneo as a test * Attempt cleanup * include failed packages * export log into step summary * let's only scan rpms, not srpms * Wrap log in code block * Clean up logging more * bump bun and prismlauncher as tests, revert later * Revert "bump bun and prismlauncher as tests, revert later" This reverts commit 1239fa7c5cb48719b15cba664212cc31c358dc70. * disable xtrace on summary generator * add veto warning * Revert "bump xpadneo as a test" This reverts commit a1d04734b0b9e8dd7bcd5bc6dea455974c0ddf2b. * test: bump bat-extras * Revert "test: bump bat-extras" This reverts commit ee4d9e011670cf2eb6274e7a2dfb1d47007fc952. --- .github/workflows/autobuild.yml | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 4e3fab3f60..e620f0371d 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -43,3 +43,66 @@ jobs: with: packages: ${{ needs.manifest.outputs.build_matrix }} publish: ${{ github.event_name == 'push' }} + + appstream: + needs: build + runs-on: ubuntu-latest + container: + image: ghcr.io/terrapkg/appstream-generator:main + steps: + - name: Download artifacts + uses: actions/download-artifact@v5 + with: + merge-multiple: true + path: ./artifacts + - name: Generate test catalog + # run appstream-builder, then add step summary + run: | + set -x + appstream-builder -v \ + --packages-dir=artifacts/rpms \ + --icons-dir=icons \ + --include-failed \ + --output-dir=output \ + --uncompressed-icons \ + --origin=test \ + --basename=test \ + --veto-ignore=missing-parents \ + --veto-ignore=missing-info 2>&1 | tee asb.log + - name: Export logs + id: export_logs + run: | + echo "## AppStream Builder Log" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```log' >> $GITHUB_STEP_SUMMARY + cat asb.log >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo '---' >> $GITHUB_STEP_SUMMARY + + - name: Report Summary + id: report_summary + run: | + echo "## AppStream Builder Report" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + if grep -q "veto" asb.log; then + echo "::group::Vetoed packages" + echo "### Vetoed packages" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```xml' >> $GITHUB_STEP_SUMMARY + echo "$(grep -i 'veto' asb.log)" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo "::warning file=asb.log::Some packages were vetoed during AppStream generation. Please review the 'Vetoed packages' section in the summary for details." + echo "::endgroup::" + fi + echo "## Full Data Summary" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Generated Appstream files:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + for file in output/*.xml.gz; do + echo "#### \`$file\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```xml' >> $GITHUB_STEP_SUMMARY + zcat "$file" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + done