-
Notifications
You must be signed in to change notification settings - Fork 7
149 lines (120 loc) · 3.64 KB
/
Copy pathbenchmark.yml
File metadata and controls
149 lines (120 loc) · 3.64 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Performance Benchmarks
defaults:
run:
shell: bash
permissions:
contents: write
pull-requests: write
env:
DOTNET_VERSION: '8.0.x'
on:
push:
branches: [ "add-performance-benchmark-with-efcore" ]
release:
types: [ published ]
workflow_dispatch:
jobs:
benchmark-mysql:
name: MySQL Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Load .env file
uses: xom9ikk/dotenv@v2.3.0
with:
load-mode: strict
- name: Docker compose
uses: hoverkraft-tech/compose-action@v1.5.1
with:
services: mysqldb
- name: Run Benchmark
run: ./benchmark/scripts/run_benchmark_for_db.sh mysql
- name: Upload Results
uses: actions/upload-artifact@v4
if: success()
with:
name: mysql-results
path: benchmark/BenchmarkDotNet.Artifacts/results/mysql/
benchmark-postgresql:
name: PostgreSQL Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Load .env file
uses: xom9ikk/dotenv@v2.3.0
with:
load-mode: strict
- name: Docker compose
uses: hoverkraft-tech/compose-action@v1.5.1
with:
services: postgresdb
- name: Run Benchmark
run: ./benchmark/scripts/run_benchmark_for_db.sh postgresql
- name: Upload Results
uses: actions/upload-artifact@v4
if: success()
with:
name: postgresql-results
path: benchmark/BenchmarkDotNet.Artifacts/results/postgresql/
benchmark-sqlite:
name: SQLite Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Load .env file
uses: xom9ikk/dotenv@v2.3.0
with:
load-mode: strict
- name: Run Benchmark
run: ./benchmark/scripts/run_benchmark_for_db.sh sqlite
- name: Upload Results
uses: actions/upload-artifact@v4
if: success()
with:
name: sqlite-results
path: benchmark/BenchmarkDotNet.Artifacts/results/sqlite/
push-results:
name: Push Results
runs-on: ubuntu-latest
if: always()
needs: [benchmark-mysql, benchmark-postgresql, benchmark-sqlite]
steps:
- uses: actions/checkout@v4
- name: Download MySQL Results
uses: actions/download-artifact@v4
with:
name: mysql-results
path: benchmark/BenchmarkDotNet.Artifacts/results/mysql
- name: Download PostgreSQL Results
uses: actions/download-artifact@v4
with:
name: postgresql-results
path: benchmark/BenchmarkDotNet.Artifacts/results/postgresql
- name: Download SQLite Results
uses: actions/download-artifact@v4
with:
name: sqlite-results
path: benchmark/BenchmarkDotNet.Artifacts/results/sqlite
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
base: main
title: update benchmark results
commit-message: update benchmark results
branch: update-benchmark-results
branch-suffix: timestamp
delete-branch: true