fix: lint #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: Dotnet Build | |
| run: dotnet build ./benchmark/BenchmarkRunner/BenchmarkRunner.csproj -c Release | |
| - 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 | |
| with: | |
| name: mysql-results | |
| path: benchmark/BenchmarkDotNet.Artifacts/results/*.{md,html,csv} | |
| 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 | |
| with: | |
| name: postgresql-results | |
| path: benchmark/BenchmarkDotNet.Artifacts/results/*.{md,html,csv} | |
| 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: Dotnet Build | |
| run: dotnet build ./benchmark/BenchmarkRunner/BenchmarkRunner.csproj -c Release | |
| - 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 | |
| with: | |
| name: sqlite-results | |
| path: benchmark/BenchmarkDotNet.Artifacts/results/*.{md,html,csv} | |
| push-results: | |
| name: Push Results | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [benchmark-mysql, benchmark-postgresql, benchmark-sqlite] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Dotnet Build | |
| run: dotnet build ./benchmark/BenchmarkRunner/BenchmarkRunner.csproj -c Release | |
| - 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 |