|
1 | | -name: Test pip-install dotenv - exact reproduction |
| 1 | +name: Reproduce setup-python pip-install issue |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - test-exact-scenario: |
| 7 | + reproduce: |
8 | 8 | runs-on: ubuntu-latest |
| 9 | + |
9 | 10 | steps: |
10 | | - - name: Setup Python (exactly like nathanblair) |
| 11 | + - name: Checkout |
| 12 | + uses: actions/checkout@v4 |
| 13 | + |
| 14 | + - name: Setup Python with pip-install |
11 | 15 | uses: actions/setup-python@v6 |
12 | 16 | with: |
13 | | - python-version: 3.11 |
| 17 | + python-version: "3.12" |
14 | 18 | pip-install: dotenv |
15 | 19 |
|
16 | | - - name: Test - Direct Python import (exactly what they tried) |
| 20 | + - name: Verify Python and pip |
17 | 21 | run: | |
18 | | - python -c "from dotenv import find_dotenv, load_dotenv, set_key, get_key; print('SUCCESS: All imports worked!')" |
| 22 | + python --version |
| 23 | + pip --version |
| 24 | + which python |
| 25 | + which pip |
19 | 26 |
|
20 | | - - name: Test - With python3 |
| 27 | + - name: Show installed packages |
21 | 28 | run: | |
22 | | - python3 -c "from dotenv import find_dotenv, load_dotenv, set_key, get_key; print('SUCCESS: All imports worked!')" |
| 29 | + pip list |
23 | 30 |
|
24 | | - - name: Test - In a simple script |
| 31 | + - name: Create test script |
25 | 32 | run: | |
26 | | - cat > test.py << 'EOF' |
| 33 | + cat <<'EOF' > test.py |
27 | 34 | from dotenv import find_dotenv, load_dotenv, set_key, get_key |
28 | | - print('SUCCESS: Script imports worked!') |
| 35 | +
|
| 36 | + print("dotenv import succeeded") |
29 | 37 | EOF |
30 | | - python test.py |
31 | 38 |
|
32 | | - - name: Debug - Show what's installed |
| 39 | + - name: Run test script |
33 | 40 | run: | |
34 | | - echo "=== Python location ===" |
35 | | - which python |
36 | | - python --version |
37 | | - echo "" |
38 | | - echo "=== Installed packages ===" |
39 | | - python -m pip list | grep dotenv |
40 | | - echo "" |
41 | | - echo "=== Try importing ===" |
42 | | - python -c "import dotenv; print(f'dotenv location: {dotenv.__file__}')" |
43 | | - python -c "from dotenv import find_dotenv; print('find_dotenv imported successfully')" |
| 41 | + python test.py |
0 commit comments