Skip to content

Commit 46d12b5

Browse files
committed
👷 Add codspeed to actions
1 parent c95eddb commit 46d12b5

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,35 @@ jobs:
6565
with:
6666
token: ${{ secrets.CODECOV_TOKEN }}
6767

68-
performance-tests:
69-
name: Run the performance test suite
68+
# performance-tests:
69+
# name: Run the performance test suite
70+
# runs-on: ubuntu-latest
71+
72+
# steps:
73+
# - uses: actions/checkout@v4
74+
75+
# - name: Bring up docker compose and load data
76+
# run: |
77+
# docker compose up -d --build || ( docker compose logs >&2 && exit 1; )
78+
# until docker compose logs web | grep -q "spawned uWSGI worker"; do
79+
# echo "uWSGI not running yet, waiting..."
80+
# sleep 3
81+
# done
82+
# docker compose exec --user root web pip install factory-boy
83+
# cat performance_test/create_data.py | docker compose exec -T web src/manage.py shell
84+
85+
# - name: Run tests
86+
# run: |
87+
# pip install -r requirements/ci.txt
88+
# pytest performance_test/ --benchmark-json output.json
89+
90+
name: CodSpeed
91+
92+
benchmarks:
93+
name: Run benchmarks
7094
runs-on: ubuntu-latest
71-
7295
steps:
7396
- uses: actions/checkout@v4
74-
7597
- name: Bring up docker compose and load data
7698
run: |
7799
docker compose up -d --build || ( docker compose logs >&2 && exit 1; )
@@ -82,10 +104,15 @@ jobs:
82104
docker compose exec --user root web pip install factory-boy
83105
cat performance_test/create_data.py | docker compose exec -T web src/manage.py shell
84106
85-
- name: Run tests
107+
- name: Install dependencies
86108
run: |
87109
pip install -r requirements/ci.txt
88-
pytest performance_test/ --benchmark-json output.json
110+
111+
- name: Run benchmarks
112+
uses: CodSpeedHQ/action@v3
113+
with:
114+
token: ${{ secrets.CODSPEED_TOKEN }}
115+
run: "pytest performance_test/ --codspeed"
89116

90117
docs:
91118
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)