mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
feat: Adding ci/cd benchmark
This commit is contained in:
parent
af998ef868
commit
18f5a5965e
1 changed files with 36 additions and 0 deletions
36
.github/workflows/benchmark.yml
vendored
Normal file
36
.github/workflows/benchmark.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: "Benchmarks"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
lint:
|
||||
name: Benchmark
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Prepare env
|
||||
run: |
|
||||
sed -i 's/traefik/localhost/g' .env
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
- name: Install Oha
|
||||
run: |
|
||||
echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" | sudo tee /etc/apt/sources.list.d/azlux.list
|
||||
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
|
||||
apt update
|
||||
apt install oha
|
||||
- name: Benchmark
|
||||
run: |
|
||||
oha -z 180s http://localhost:9501/v1/health/version -j > benchmark.json
|
||||
- name: Save results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: benchmark.json
|
||||
path: benchmark.json
|
||||
retention-days: 7
|
||||
Loading…
Reference in a new issue