Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfix committed Feb 25, 2025
2 parents 1d809dc + 7642246 commit a7bfb70
Show file tree
Hide file tree
Showing 4 changed files with 631 additions and 47 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: codspeed

on:
push:
branches:
- "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.9"

- name: Get full Python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
run: |
curl -fsS https://install.python-poetry.org | python - -y
- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.create false

- name: Install dependencies
run: poetry install --only test --only benchmark --only build -vvv --no-root

- name: Install project
run: poetry install --only test --only benchmark --only build -vvv --no-root

- name: Install pendulum and check extensions
run: |
poetry run pip install -e . -vvv
python -c 'import pendulum._pendulum'
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/ --codspeed
19 changes: 10 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ jobs:
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
run: |
curl -fsS https://install.python-poetry.org | python - --version 1.8.5 -y
# curl -fsS https://install.python-poetry.org | python - --version 1.8.5 -y

- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
# - 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: Update Path for Windows
# if: ${{ matrix.os == 'Windows' }}
# run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
run: |
pipx install poetry>=2
- name: Configure poetry
run: poetry config virtualenvs.in-project true
Expand Down Expand Up @@ -90,7 +91,7 @@ jobs:

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

- name: Test Pure Python
run: |
Expand Down
Loading

0 comments on commit a7bfb70

Please sign in to comment.