Skip to content

Commit 6ebb3a7

Browse files
authored
Create test_uv_install.yml
1 parent 7fdb024 commit 6ebb3a7

1 file changed

Lines changed: 104 additions & 0 deletions

File tree

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# .github/workflows/test_uv_install.yml
2+
name: Simple UV Multi-Version Test
3+
4+
on:
5+
workflow_dispatch: # Allows manual trigger from GitHub UI
6+
push:
7+
branches: [ 'main', 'test-workflows-feature' ] # Trigger on pushes to main or a specific feature branch
8+
9+
jobs:
10+
install-uv-versions:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # Needed if you want to commit a report back to the repo
14+
15+
steps:
16+
- name: 🏁 Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: 🐍 Set up Python 3.11 (or latest supported by omnipkg)
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.11' # Use 3.11 as that's what omnipkg targets for best compatibility
23+
24+
- name: 🔧 Install Redis for omnipkg
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y redis-server
28+
sudo systemctl start redis-server
29+
redis-cli ping # Test Redis connection
30+
31+
- name: 📦 Install omnipkg
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -e . # Install omnipkg in editable mode from your repo
35+
36+
- name: 🧪 Attempt to install uv==0.7.12 and uv==0.7.14 with omnipkg
37+
id: omnipkg_uv_install
38+
run: |
39+
echo "--- Attempting omnipkg install uv==0.7.12 uv==0.7.14 ---"
40+
omnipkg install uv==0.7.12 uv==0.7.14
41+
42+
if [ $? -eq 0 ]; then
43+
echo "::set-output name=success::true"
44+
echo "omnipkg install completed successfully."
45+
else
46+
echo "::set-output name=success::false"
47+
echo "omnipkg install failed. See logs for details."
48+
exit 1 # Fail the step if omnipkg install fails
49+
fi
50+
51+
- name: ✅ Verify Active UV Version
52+
if: steps.omnipkg_uv_install.outputs.success == 'true'
53+
run: |
54+
echo "--- Verifying Active UV Version ---"
55+
python -c "import uv; print(f'Active UV version reported by Python: {uv.__version__}')"
56+
omnipkg status # Show overall omnipkg status
57+
omnipkg info uv # Show detailed info for uv
58+
59+
- name: 📊 Generate simple report
60+
if: always() # This step will run regardless of previous step's success
61+
run: |
62+
REPORT_FILE="uv_test_report.md"
63+
echo "# UV Multi-Version Installation Test Report" > $REPORT_FILE
64+
echo "" >> $REPORT_FILE
65+
echo "**Workflow Run:** [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $REPORT_FILE
66+
echo "**Test Status:** `${{ steps.omnipkg_uv_install.outcome }}`" >> $REPORT_FILE
67+
echo "" >> $REPORT_FILE
68+
echo "### Test Scenario" >> $REPORT_FILE
69+
echo "\`\`\`bash" >> $REPORT_FILE
70+
echo "omnipkg install uv==0.7.12 uv==0.7.14" >> $REPORT_FILE
71+
echo "\`\`\`" >> $REPORT_FILE
72+
echo "" >> $REPORT_FILE
73+
74+
echo "### omnipkg Status Output" >> $REPORT_FILE
75+
echo "\`\`\`" >> $REPORT_FILE
76+
omnipkg status >> $REPORT_FILE 2>&1
77+
echo "\`\`\`" >> $REPORT_FILE
78+
echo "" >> $REPORT_FILE
79+
80+
echo "### omnipkg Info UV Output" >> $REPORT_FILE
81+
echo "\`\`\`" >> $REPORT_FILE
82+
omnipkg info uv >> $REPORT_FILE 2>&1
83+
echo "\`\`\`" >> $REPORT_FILE
84+
echo "" >> $REPORT_FILE
85+
86+
echo "### Active UV Version Check" >> $REPORT_FILE
87+
echo "\`\`\`" >> $REPORT_FILE
88+
python -c "import uv; print(f'Active UV version reported by Python: {uv.__version__}')" >> $REPORT_FILE 2>&1
89+
echo "\`\`\`" >> $REPORT_FILE
90+
91+
if [ "${{ steps.omnipkg_uv_install.outputs.success }}" == "true" ]; then
92+
echo "### Conclusion" >> $REPORT_FILE
93+
echo "✅ omnipkg successfully installed multiple conflicting `uv` versions and maintains the active version while keeping others isolated. This demonstrates `omnipkg`'s core conflict resolution capabilities." >> $REPORT_FILE
94+
else
95+
echo "### Conclusion" >> $REPORT_FILE
96+
echo "❌ omnipkg failed to install multiple `uv` versions as expected. Review logs for errors." >> $REPORT_FILE
97+
fi
98+
99+
- name: 📤 Upload Report Artifact
100+
uses: actions/upload-artifact@v3
101+
with:
102+
name: uv-multi-version-test-report
103+
path: uv_test_report.md
104+
retention-days: 30

0 commit comments

Comments
 (0)