mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
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 commit1239fa7c5c. * disable xtrace on summary generator * add veto warning * Revert "bump xpadneo as a test" This reverts commita1d04734b0. * test: bump bat-extras * Revert "test: bump bat-extras" This reverts commitee4d9e0116.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user