@@ -96,28 +96,57 @@ jobs:
9696 echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV
9797 echo "Generated test GPG key: $GPG_KEY_ID"
9898
99- - name : Test mock publishing workflow
100- uses : ./
99+ - name : Checkout APT repo (for local testing)
100+ uses : actions/checkout@v4
101101 with :
102- publish : true
103- component : test-package
104- distribution : noble
105- channel : testing
106- debs-path : test-debs
107- pages-repo : https://github.com/feelpp/apt.git
108- gpg-key-id : ${{ env.GPG_KEY_ID }}
109- apt-repo-path : .
110- continue-on-error : true
111- id : mock-publish
102+ repository : feelpp/apt
103+ path : apt-repo
112104
113- - name : Verify mock publishing behavior
105+ - name : Test publishing workflow (will fail at git push)
106+ shell : bash
114107 run : |
115- if [ "${{ steps.mock-publish.outcome }}" = "success" ]; then
116- echo "✅ Mock publishing workflow completed successfully"
108+ set +e # Don't exit on error
109+
110+ # Install feelpp-aptly-publisher
111+ cd apt-repo
112+ pip install -e .
113+ cd ..
114+
115+ # Run the publish command
116+ # This will succeed up until the git push, which will fail without credentials
117+ # That's expected and validates the rest of the publishing logic works
118+ echo "Testing feelpp-apt-publish workflow..."
119+
120+ feelpp-apt-publish \
121+ --component test-package \
122+ --distro noble \
123+ --channel testing \
124+ --debs test-debs \
125+ --verbose \
126+ --sign \
127+ --keyid ${{ env.GPG_KEY_ID }} 2>&1 | tee publish-output.log
128+
129+ EXIT_CODE=$?
130+
131+ # Check if we got far enough to attempt the git push
132+ if grep -q "git push origin gh-pages" publish-output.log; then
133+ echo "✅ Publishing logic validated (failed at expected git push step)"
134+ exit 0
135+ elif grep -q "Publish test-package (noble/testing)" publish-output.log; then
136+ echo "✅ Publishing logic validated (git operations executed)"
137+ exit 0
117138 else
118- echo "⚠️ Mock publishing failed as expected (no real git access)"
119- echo "This is normal for the mock test environment"
139+ echo "❌ Publishing failed before completing expected steps"
140+ cat publish-output.log
141+ exit 1
120142 fi
143+ continue-on-error : false
144+ id : mock-publish
145+
146+ - name : Verify publishing behavior
147+ run : |
148+ echo "✅ Publishing workflow tested successfully"
149+ echo "Note: Test validates publishing logic up to git push"
121150
122151 test-cross-platform :
123152 name : Test Cross-Platform Support
0 commit comments