-
Notifications
You must be signed in to change notification settings - Fork 56
192 lines (181 loc) · 5.43 KB
/
installer.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: Test install-poetry.py
on:
push:
paths:
- 'install-poetry.py'
- '.github/workflows/installer.yml'
branches:
- main
pull_request:
paths:
- 'install-poetry.py'
- '.github/workflows/installer.yml'
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# default:
# name: ${{ matrix.os }} / ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
# runs-on: ${{ matrix.image }}
# strategy:
# matrix:
# os: [Ubuntu, macOS, Windows]
# python-version:
# - "3.9"
# - "3.10"
# - "3.11"
# - "3.12"
# - "3.13"
# args:
# - ""
# - "--preview"
# - "--git https://github.com/python-poetry/poetry.git"
# include:
# - os: Ubuntu
# image: ubuntu-22.04
# - os: Windows
# image: windows-2022
# - os: macOS
# image: macos-12
# fail-fast: false
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Update PATH
# if: ${{ matrix.os != 'Windows' }}
# run: echo "$HOME/.local/bin" >> $GITHUB_PATH
#
# - name: Update PATH for Windows
# if: ${{ matrix.os == 'Windows' }}
# run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
#
# - name: Install Poetry
# run: python install-poetry.py -y ${{ matrix.args }}
#
# - name: Upload Failure Log
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: poetry-installer-error.log
# path: poetry-installer-error-*.log
#
# - name: Verify Installation
# run: |
# set -e
# poetry new foobar
# cd foobar
# poetry config virtualenvs.in-project true
# poetry env use python
# [ "$(poetry run python --version)" == "$(python --version)" ] \
# || { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
#
# - name: Uninstall Poetry
# run: |
# python install-poetry.py -y --uninstall
# { type poetry 2>/dev/null >&2 && exit 1; } || exit 0
#
# # debian/ubuntu needs special testing due to various issues around python packaging
# # and configuration
# integration-ubuntu:
# name: Integration Test / Ubuntu / ${{ matrix.tag }}
# runs-on: ubuntu-latest
# container: docker.io/ubuntu:${{ matrix.tag }}
# strategy:
# matrix:
# tag:
# - focal
# - jammy
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v4
#
# - name: Install Packages
# run: |
# apt-get -y update
# apt-get -y install python3 ca-certificates
# apt-get -y install --reinstall python3-distutils
#
# - name: Update PATH
# run: echo "$HOME/.local/bin" >> $GITHUB_PATH
#
# - name: Install Poetry
# env:
# DEB_PYTHON_INSTALL_LAYOUT: "deb"
# run: python3 install-poetry.py -y
#
# - name: Upload Failure Log
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: poetry-installer-error.log
# path: poetry-installer-error-*.log
#
# - name: Verify Installation
# run: |
# set -e
# poetry new foobar
# cd foobar
# poetry config virtualenvs.in-project true
# poetry env use python3
# [ "$(poetry run python --version)" == "$(python3 --version)" ] \
# || { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
#
# - name: Uninstall Poetry
# run: |
# python3 install-poetry.py -y --uninstall
# { type poetry 2>/dev/null >&2 && exit 1; } || exit 0
integration-macos-homebrew:
name: Integration Test / MacOS / Homebrew Python
runs-on: macos-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install Homebrew
run: |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> /Users/runner/.bash_profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/runner/.bash_profile
- name: Install Python 3.13
run: |
brew install [email protected]
- name: Install Poetry
run: |
python -m site
ls -all $(which python)
curl -sSL https://install.python-poetry.org | python -
- name: Install Python 3.12
run: |
brew install [email protected]
echo "$(brew --prefix [email protected])/libexec/bin" >> $GITHUB_PATH
- name: Test Poetry
run: |
python -m site
ls -all $(which python)
poetry new foo
cd foo
poetry add pycowsay
poetry run pycowsay
- name: Uninstall Python 3.13
run: |
brew uninstall --ignore-dependencies [email protected]
- name: Test Poetry
run: |
ls -all /Library/Frameworks/Python.framework/Versions/Current/bin/python || :
python -m site
ls -all $(which python)
cd foo
poetry run pycowsay