Skip to content

Commit 935539a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into enables-python-3.13
2 parents be8936f + 7642246 commit 935539a

File tree

4 files changed

+217
-47
lines changed

4 files changed

+217
-47
lines changed

.github/workflows/codspeed.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: codspeed
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
# `workflow_dispatch` allows CodSpeed to trigger backtest
9+
# performance analysis in order to generate initial data.
10+
workflow_dispatch:
11+
12+
jobs:
13+
benchmarks:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v3
18+
with:
19+
python-version: "3.9"
20+
21+
- name: Get full Python version
22+
id: full-python-version
23+
run: |
24+
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
25+
26+
- name: Install poetry
27+
run: |
28+
curl -fsS https://install.python-poetry.org | python - -y
29+
30+
- name: Update PATH
31+
if: ${{ matrix.os != 'Windows' }}
32+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
33+
34+
- name: Configure poetry
35+
run: poetry config virtualenvs.create false
36+
37+
- name: Install dependencies
38+
run: poetry install --only test --only benchmark --only build -vvv --no-root
39+
40+
- name: Install project
41+
run: poetry install --only test --only benchmark --only build -vvv --no-root
42+
43+
- name: Install pendulum and check extensions
44+
run: |
45+
poetry run pip install -e . -vvv
46+
python -c 'import pendulum._pendulum'
47+
48+
- name: Run benchmarks
49+
uses: CodSpeedHQ/action@v3
50+
with:
51+
token: ${{ secrets.CODSPEED_TOKEN }}
52+
run: pytest tests/ --codspeed

.github/workflows/tests.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,8 @@ jobs:
5353
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
5454
5555
- name: Install poetry
56-
uses: snok/install-poetry@v1
57-
with:
58-
virtualenvs-create: true
59-
virtualenvs-in-project: true
60-
installer-parallel: true
61-
version: 1.8.5
62-
63-
- name: Update PATH
64-
if: ${{ matrix.os != 'Windows' }}
65-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
66-
67-
- name: Update Path for Windows
68-
if: ${{ matrix.os == 'Windows' }}
69-
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
56+
run: |
57+
pipx install poetry>=2
7058
7159
- name: Configure poetry
7260
run: poetry config virtualenvs.in-project true
@@ -94,7 +82,7 @@ jobs:
9482

9583
- name: Uninstall typing dependencies
9684
# This ensures pendulum runs without typing_extensions installed
97-
run: poetry install --only main --only test --only build --sync --no-root -vvv
85+
run: poetry sync --only main --only test --only build --no-root -vvv
9886

9987
- name: Test Pure Python
10088
run: |

0 commit comments

Comments
 (0)