Skip to content

Commit 3bdb74b

Browse files
authored
Update GitHub Actions workflow for Python dotenv
1 parent 792f27d commit 3bdb74b

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

.github/workflows/testingfr#77.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
1-
name: Test pip-install dotenv - exact reproduction
1+
name: Reproduce setup-python pip-install issue
22

33
on:
44
workflow_dispatch:
55

66
jobs:
7-
test-exact-scenario:
7+
reproduce:
88
runs-on: ubuntu-latest
9+
910
steps:
10-
- name: Setup Python (exactly like nathanblair)
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Python with pip-install
1115
uses: actions/setup-python@v6
1216
with:
13-
python-version: 3.11
17+
python-version: "3.12"
1418
pip-install: dotenv
1519

16-
- name: Test - Direct Python import (exactly what they tried)
20+
- name: Verify Python and pip
1721
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
1926
20-
- name: Test - With python3
27+
- name: Show installed packages
2128
run: |
22-
python3 -c "from dotenv import find_dotenv, load_dotenv, set_key, get_key; print('SUCCESS: All imports worked!')"
29+
pip list
2330
24-
- name: Test - In a simple script
31+
- name: Create test script
2532
run: |
26-
cat > test.py << 'EOF'
33+
cat <<'EOF' > test.py
2734
from dotenv import find_dotenv, load_dotenv, set_key, get_key
28-
print('SUCCESS: Script imports worked!')
35+
36+
print("dotenv import succeeded")
2937
EOF
30-
python test.py
3138
32-
- name: Debug - Show what's installed
39+
- name: Run test script
3340
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

Comments
 (0)