diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 47ec3d3..ee40aed 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -43,7 +43,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..8d5ab82 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,40 @@ +name: .NET + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '8.0.x', '9.0.x' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v4 + id: stepid + with: + dotnet-version: ${{ matrix.dotnet-version }} + # - name: Create temporary global.json + # run: echo '{"sdk":{"version":"${{ steps.stepid.outputs.dotnet-version }}"}}' > ./global.json + - name: Display dotnet version + run: dotnet --version + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build +# - name: Archive test results +# uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: TestResults +# path: | +# /home/runner/work/Activout.DatabaseClient/Activout.DatabaseClient/Activout.DatabaseClient.Test/TestResults/ diff --git a/Activout.DatabaseClient.Dapper/Activout.DatabaseClient.Dapper.csproj b/Activout.DatabaseClient.Dapper/Activout.DatabaseClient.Dapper.csproj index 78ccef6..e18deb8 100644 --- a/Activout.DatabaseClient.Dapper/Activout.DatabaseClient.Dapper.csproj +++ b/Activout.DatabaseClient.Dapper/Activout.DatabaseClient.Dapper.csproj @@ -1,11 +1,12 @@ - netcoreapp3.1 + default + net8.0 - + diff --git a/Activout.DatabaseClient.Test/Activout.DatabaseClient.Test.csproj b/Activout.DatabaseClient.Test/Activout.DatabaseClient.Test.csproj index 79c570f..4b383c7 100644 --- a/Activout.DatabaseClient.Test/Activout.DatabaseClient.Test.csproj +++ b/Activout.DatabaseClient.Test/Activout.DatabaseClient.Test.csproj @@ -1,17 +1,20 @@ - netcoreapp3.1 false + + default + + net8.0 - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Activout.DatabaseClient/Activout.DatabaseClient.csproj b/Activout.DatabaseClient/Activout.DatabaseClient.csproj index 95ce4ca..c0dd332 100644 --- a/Activout.DatabaseClient/Activout.DatabaseClient.csproj +++ b/Activout.DatabaseClient/Activout.DatabaseClient.csproj @@ -1,11 +1,12 @@  - netcoreapp3.1 + default + net8.0 - + diff --git a/global.json b/global.json new file mode 100644 index 0000000..dad2db5 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file