-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegration-test-migrate-python-macos-system.yml
More file actions
69 lines (58 loc) · 2.19 KB
/
integration-test-migrate-python-macos-system.yml
File metadata and controls
69 lines (58 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Integration Tests - Migrate Python from System (macOS)
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
migrate:
name: Python from System (macOS)
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
- name: Build dtvem
run: |
go build -v -ldflags="-s -w" -o dist/dtvem ./src
go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim
- name: Initialize dtvem
run: ./dist/dtvem init --yes
- name: Add dtvem to PATH
run: |
echo "$HOME/.dtvem/shims" >> $GITHUB_PATH
echo "$HOME/.dtvem/bin" >> $GITHUB_PATH
- name: "Install Python 3.10 via Homebrew"
run: |
brew install python@3.10
brew link --overwrite python@3.10
echo "System Python installed at: $(which python3.10)"
python3.10 --version
- name: "Migrate system Python to dtvem"
run: |
echo "=== Running migrate detection ==="
# Select "all" to migrate all detected versions
echo -e "all\n0\n" | ./dist/dtvem migrate python || true
echo ""
echo "=== Verifying migration ==="
./dist/dtvem list python
- name: "Verify migrated version"
run: |
./dist/dtvem list python | grep -E "3\.10\." || (echo "ERROR: Expected Python 3.10.x to be migrated" && exit 1)
echo "SUCCESS: Python 3.10.x was migrated from system"
- name: Generate summary
if: always()
run: |
echo "## Python Migration from System (macOS)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Source:** Homebrew" >> $GITHUB_STEP_SUMMARY
echo "**Version:** 3.10.x" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
./dist/dtvem list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY