-
Notifications
You must be signed in to change notification settings - Fork 39
140 lines (132 loc) · 3.79 KB
/
main.yaml
File metadata and controls
140 lines (132 loc) · 3.79 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
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
on:
- push
- pull_request
name: Main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: |
pip install poetry==1.8.4
poetry install
poetry run pre-commit run --all-files --show-diff-on-failure
test-poetry-v1:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
# * As of 2024-06-26, Poetry has started failing to install on 3.7:
# `TypeError: Expected maxsize to be an integer or None`
# * As of 2025-05-06, Poetry has started failing to install on 3.8:
# `TypeError: 'ABCMeta' object is not subscriptable`
- '3.9'
- '3.10'
- '3.11'
poetry-version:
- '1.3.2'
- '1.4.2'
- '1.5.1'
- '1.6.1'
- '1.7.1'
- '1.8.4'
unlocked:
- false
include:
- python-version: '3.12'
poetry-version: '1.8.4'
unlocked: true
- python-version: '3.13'
poetry-version: '1.8.4'
unlocked: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- if: ${{ matrix.unlocked }}
run: |
rm poetry.lock
- run: |
pip install pipx
pipx install poetry==${{ matrix.poetry-version }}
pipx install invoke
# We could use `poetry install --extras plugin`,
# but Poetry may decide to install a different version than `matrix.poetry-version`.
poetry install
poetry run pip install poetry==${{ matrix.poetry-version }}
invoke test --pipx
test-poetry-v2:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
poetry-version:
- '2.0.1'
- '2.1.1'
unlocked:
- false
include:
- python-version: '3.12'
poetry-version: '2.0.0'
unlocked: true
- python-version: '3.13'
poetry-version: '2.0.0'
unlocked: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: |
echo "USE_PEP621=1" >> $GITHUB_ENV
- if: ${{ matrix.unlocked }}
run: |
rm poetry.lock
- run: |
pip install pipx
pipx install poetry==${{ matrix.poetry-version }}
pipx install invoke
# We could use `poetry install --extras plugin`,
# but Poetry may decide to install a different version than `matrix.poetry-version`.
poetry install
poetry run pip install poetry==${{ matrix.poetry-version }}
invoke test --pipx
test-poetry-dev:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
poetry-version:
- 'git+https://github.com/python-poetry/poetry.git@main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: |
echo "USE_PEP621=1" >> $GITHUB_ENV
- run: |
pip install pipx
pipx install ${{ matrix.poetry-version }}
pipx install invoke
poetry install
poetry run pip install ${{ matrix.poetry-version }}
invoke test --pipx