Skip to content

Commit bf9a252

Browse files
authored
Just use git for checkout (#506)
actions/checkout is repeatedly flaky See also actions/checkout#1951 On the other hand, plain git clone seems to work just fine and never has connection issues checking out the default branch Funnily enough, the YAML is shorter this way too
1 parent e888dfd commit bf9a252

File tree

1 file changed

+52
-67
lines changed

1 file changed

+52
-67
lines changed

.github/workflows/third_party.yml

Lines changed: 52 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,27 @@ jobs:
4848
runs-on: ubuntu-latest
4949
timeout-minutes: 60
5050
steps:
51-
- name: Checkout pydantic
52-
uses: actions/checkout@v4
51+
- name: Setup Python
52+
uses: actions/setup-python@v5
5353
with:
54-
repository: pydantic/pydantic
54+
python-version: ${{ matrix.python-version }}
55+
allow-prereleases: true
56+
- name: Install uv
57+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
58+
- name: Checkout pydantic
59+
run: git clone https://github.com/pydantic/pydantic.git
5560
- name: Checkout typing_extensions
5661
uses: actions/checkout@v4
5762
with:
5863
path: typing-extensions-latest
59-
- name: Install uv
60-
uses: astral-sh/setup-uv@v3
61-
- name: Set up Python ${{ matrix.python-version }}
62-
run: uv python install ${{ matrix.python-version }}
6364
- name: Add local version of typing_extensions as a dependency
64-
run: uv add --editable ./typing-extensions-latest
65+
run: cd pydantic; uv add --editable ../typing-extensions-latest
6566
- name: Install pydantic test dependencies
66-
run: uv sync --group dev
67+
run: cd pydantic; uv sync --group dev
6768
- name: List installed dependencies
68-
run: uv pip list
69+
run: cd pydantic; uv pip list
6970
- name: Run pydantic tests
70-
run: uv run pytest
71+
run: cd pydantic; uv run pytest
7172

7273
typing_inspect:
7374
name: typing_inspect tests
@@ -88,21 +89,18 @@ jobs:
8889
runs-on: ubuntu-latest
8990
timeout-minutes: 60
9091
steps:
91-
- name: Checkout typing_inspect
92-
uses: actions/checkout@v4
93-
with:
94-
repository: ilevkivskyi/typing_inspect
95-
path: typing_inspect
96-
- name: Checkout typing_extensions
97-
uses: actions/checkout@v4
98-
with:
99-
path: typing-extensions-latest
10092
- name: Setup Python
10193
uses: actions/setup-python@v5
10294
with:
10395
python-version: ${{ matrix.python-version }}
10496
- name: Install uv
10597
run: curl -LsSf https://astral.sh/uv/install.sh | sh
98+
- name: Checkout typing_inspect
99+
run: git clone https://github.com/ilevkivskyi/typing_inspect.git
100+
- name: Checkout typing_extensions
101+
uses: actions/checkout@v4
102+
with:
103+
path: typing-extensions-latest
106104
- name: Install typing_inspect test dependencies
107105
run: |
108106
set -x
@@ -136,22 +134,19 @@ jobs:
136134
runs-on: ubuntu-latest
137135
timeout-minutes: 60
138136
steps:
139-
- name: Check out pyanalyze
140-
uses: actions/checkout@v4
141-
with:
142-
repository: quora/pyanalyze
143-
path: pyanalyze
144-
- name: Checkout typing_extensions
145-
uses: actions/checkout@v4
146-
with:
147-
path: typing-extensions-latest
148137
- name: Setup Python
149138
uses: actions/setup-python@v5
150139
with:
151140
python-version: ${{ matrix.python-version }}
152141
allow-prereleases: true
153142
- name: Install uv
154143
run: curl -LsSf https://astral.sh/uv/install.sh | sh
144+
- name: Check out pyanalyze
145+
run: git clone https://github.com/quora/pyanalyze.git
146+
- name: Checkout typing_extensions
147+
uses: actions/checkout@v4
148+
with:
149+
path: typing-extensions-latest
155150
- name: Install pyanalyze test requirements
156151
run: |
157152
set -x
@@ -185,22 +180,19 @@ jobs:
185180
runs-on: ubuntu-latest
186181
timeout-minutes: 60
187182
steps:
188-
- name: Check out typeguard
189-
uses: actions/checkout@v4
190-
with:
191-
repository: agronholm/typeguard
192-
path: typeguard
193-
- name: Checkout typing_extensions
194-
uses: actions/checkout@v4
195-
with:
196-
path: typing-extensions-latest
197183
- name: Setup Python
198184
uses: actions/setup-python@v5
199185
with:
200186
python-version: ${{ matrix.python-version }}
201187
allow-prereleases: true
202188
- name: Install uv
203189
run: curl -LsSf https://astral.sh/uv/install.sh | sh
190+
- name: Check out typeguard
191+
run: git clone https://github.com/agronholm/typeguard.git
192+
- name: Checkout typing_extensions
193+
uses: actions/checkout@v4
194+
with:
195+
path: typing-extensions-latest
204196
- name: Install typeguard test requirements
205197
run: |
206198
set -x
@@ -235,21 +227,18 @@ jobs:
235227
runs-on: ubuntu-latest
236228
timeout-minutes: 60
237229
steps:
238-
- name: Check out typed-argument-parser
239-
uses: actions/checkout@v4
240-
with:
241-
repository: swansonk14/typed-argument-parser
242-
path: typed-argument-parser
243-
- name: Checkout typing_extensions
244-
uses: actions/checkout@v4
245-
with:
246-
path: typing-extensions-latest
247230
- name: Setup Python
248231
uses: actions/setup-python@v5
249232
with:
250233
python-version: ${{ matrix.python-version }}
251234
- name: Install uv
252235
run: curl -LsSf https://astral.sh/uv/install.sh | sh
236+
- name: Check out typed-argument-parser
237+
run: git clone https://github.com/swansonk14/typed-argument-parser.git
238+
- name: Checkout typing_extensions
239+
uses: actions/checkout@v4
240+
with:
241+
path: typing-extensions-latest
253242
- name: Configure git for typed-argument-parser tests
254243
# typed-argument parser does this in their CI,
255244
# and the tests fail unless we do this
@@ -290,22 +279,19 @@ jobs:
290279
runs-on: ubuntu-latest
291280
timeout-minutes: 60
292281
steps:
293-
- name: Checkout mypy for stubtest and mypyc tests
294-
uses: actions/checkout@v4
295-
with:
296-
repository: python/mypy
297-
path: mypy
298-
- name: Checkout typing_extensions
299-
uses: actions/checkout@v4
300-
with:
301-
path: typing-extensions-latest
302282
- name: Setup Python
303283
uses: actions/setup-python@v5
304284
with:
305285
python-version: ${{ matrix.python-version }}
306286
allow-prereleases: true
307287
- name: Install uv
308288
run: curl -LsSf https://astral.sh/uv/install.sh | sh
289+
- name: Checkout mypy for stubtest and mypyc tests
290+
run: git clone https://github.com/python/mypy.git
291+
- name: Checkout typing_extensions
292+
uses: actions/checkout@v4
293+
with:
294+
path: typing-extensions-latest
309295
- name: Install mypy test requirements
310296
run: |
311297
set -x
@@ -341,30 +327,29 @@ jobs:
341327
runs-on: ubuntu-latest
342328
timeout-minutes: 60
343329
steps:
344-
- name: Checkout cattrs
345-
uses: actions/checkout@v4
330+
- name: Setup Python
331+
uses: actions/setup-python@v5
346332
with:
347-
repository: python-attrs/cattrs
333+
python-version: ${{ matrix.python-version }}
334+
- name: Checkout cattrs
335+
run: git clone https://github.com/python-attrs/cattrs.git
348336
- name: Checkout typing_extensions
349337
uses: actions/checkout@v4
350338
with:
351339
path: typing-extensions-latest
352-
- name: Setup Python
353-
uses: actions/setup-python@v5
354-
with:
355-
python-version: ${{ matrix.python-version }}
356340
- name: Install pdm for cattrs
357341
run: pip install pdm
358342
- name: Add latest typing-extensions as a dependency
359343
run: |
344+
cd cattrs
360345
pdm remove typing-extensions
361-
pdm add --dev ./typing-extensions-latest
346+
pdm add --dev ../typing-extensions-latest
362347
- name: Install cattrs test dependencies
363-
run: pdm install --dev -G :all
348+
run: cd cattrs; pdm install --dev -G :all
364349
- name: List all installed dependencies
365-
run: pdm list -vv
350+
run: cd cattrs; pdm list -vv
366351
- name: Run cattrs tests
367-
run: pdm run pytest tests
352+
run: cd cattrs; pdm run pytest tests
368353

369354
create-issue-on-failure:
370355
name: Create an issue if daily tests failed

0 commit comments

Comments
 (0)