fix: refactor benchmark directory structure #707
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: .Net Core Tests | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| DOTNET_VERSION: '8.0.x' | |
| SQLC_VERSION: 1.30.0 | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "*" ] | |
| paths: | |
| - "**" | |
| - "!**.md" | |
| - "!benchmark/BenchmarkDotNet.Artifacts/**" | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: sqlc-dev/setup-sqlc@v4 | |
| with: | |
| sqlc-version: '${{ env.SQLC_VERSION }}' | |
| - name: Dotnet publish | |
| run: dotnet publish LocalRunner -c release --output dist/ | |
| - name: Verify pushed generated code is synced | |
| run: | | |
| sqlc -f sqlc.unit.test.yaml diff | |
| - name: Run Tests | |
| run: | | |
| dotnet test unit-tests/RepositoryTests | |
| dotnet test unit-tests/CodegenTests | |
| end2end-tests: | |
| name: End-to-End Tests | |
| 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/[email protected] | |
| with: | |
| load-mode: strict | |
| - name: Docker compose | |
| uses: hoverkraft-tech/[email protected] | |
| - name: Run Tests | |
| run: ./end2end/scripts/run_tests.sh |