2020-03-23 15:39:19 +01:00
|
|
|
name: Benchmark
|
|
|
|
|
2020-03-23 18:09:14 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-09-05 19:45:29 +02:00
|
|
|
- main
|
2022-04-25 20:11:11 +02:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- ".github/workflows/benchmark.yml"
|
|
|
|
- "tests/benchmark.py"
|
2023-06-01 15:39:50 +02:00
|
|
|
workflow_dispatch:
|
2020-03-23 15:39:19 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-06-01 14:37:10 +02:00
|
|
|
python-version: ["3.11"]
|
2022-08-07 11:00:46 +02:00
|
|
|
os: [ubuntu-22.04]
|
2020-03-23 15:39:19 +01:00
|
|
|
|
|
|
|
steps:
|
2023-10-01 02:18:46 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-01 21:54:54 +02:00
|
|
|
- run: git fetch --prune --unshallow
|
2020-03-23 15:39:19 +01:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2022-08-07 10:54:21 +02:00
|
|
|
uses: actions/setup-python@v4
|
2020-03-23 15:39:19 +01:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2021-11-22 12:51:22 +01:00
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: "setup.py"
|
2020-03-23 15:39:19 +01:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2023-06-01 14:37:10 +02:00
|
|
|
python -m pip install --upgrade orjson simplejson
|
2020-03-23 18:08:06 +01:00
|
|
|
python -m pip install .
|
2020-03-23 15:39:19 +01:00
|
|
|
|
|
|
|
- name: Tests
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
python tests/benchmark.py
|