Skip to content

Commit 22875bf

Browse files
authored
Merge pull request #395 from hugovk/benchmark-on-ci
Update benchmarking
2 parents 27f7557 + f8c881a commit 22875bf

File tree

3 files changed

+151
-149
lines changed

3 files changed

+151
-149
lines changed

.github/workflows/benchmark.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.8"]
15+
os: [ubuntu-18.04]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Ubuntu cache
21+
uses: actions/cache@v1
22+
if: startsWith(matrix.os, 'ubuntu')
23+
with:
24+
path: ~/.cache/pip
25+
key:
26+
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')
27+
}}
28+
restore-keys: |
29+
${{ matrix.os }}-${{ matrix.python-version }}-
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v1
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install --upgrade nujson orjson simplejson
40+
python -m pip install .
41+
42+
- name: Tests
43+
shell: bash
44+
run: |
45+
python tests/benchmark.py

0 commit comments

Comments
 (0)