oracle provider #285
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: Build and Test | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_USER: postgres | |
| ports: | |
| - "5432:5432" | |
| oracle: | |
| image: gvenzl/oracle-free:latest | |
| env: | |
| ORACLE_PASSWORD: sys_user_password | |
| APP_USER: oracle | |
| APP_USER_PASSWORD: oracle | |
| ports: | |
| - "1521:1521" | |
| sqlserver: | |
| image: mcr.microsoft.com/mssql/server:2022-latest | |
| env: | |
| MSSQL_SA_PASSWORD: JahjdasIuqn2 | |
| ACCEPT_EULA: Y | |
| ports: | |
| - "1433:1433" | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: hjkahds68Y | |
| ports: | |
| - "3306:3306" | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '5.x.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release | |
| - name: Run unit tests | |
| run: dotnet test --filter 'Category!=IntegrationTest' --configuration Release --no-build --verbosity normal | |
| - name: Run integration tests | |
| run: dotnet test --filter 'Category=IntegrationTest' --configuration Release --no-build --verbosity normal | |
| - name: Generate a NuGet package | |
| if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') | |
| run: | | |
| for p in $(find ./src -name *.csproj); do dotnet pack $p --no-build -c Release -o .; done | |
| - name: Push to GitHub package registry | |
| if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') | |
| run: dotnet nuget push *.nupkg -k ${{secrets.NUGETORGTOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate |