File: codspeed.yml

package info (click to toggle)
pendulum 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,704 kB
  • sloc: python: 18,758; makefile: 41
file content (46 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download
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
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-22.04
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
        with:
          python-version: "3.9"

      - name: Get full Python version
        id: full-python-version
        run: |
          echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT

      - name: Install poetry
        run: |
          pipx install poetry>=2

      - name: Configure poetry
        run: poetry config virtualenvs.in-project true

      - name: Install dependencies
        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
          poetry run python -c 'import pendulum._pendulum'

      - name: Run benchmarks
        uses: CodSpeedHQ/action@dbda7111f8ac363564b0c51b992d4ce76bb89f2f # v4.5.2
        with:
          mode: simulation
          token: ${{ secrets.CODSPEED_TOKEN }}
          run: poetry run pytest tests/ --codspeed