Merge pull request #37 from yuseok-kim-edushare/dependabot/nuget/NET8… #135
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: CI tests | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ github.workspace }}/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.sln*', '**/*.csproj*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Restore NuGet packages | |
| run: | | |
| nuget restore simple-.net-Crypting-For-PowerBuilder.sln -ConfigFile nuget.config | |
| - name: Copy dependencies | |
| run: | | |
| Copy-Item -Path ${{ github.workspace }}\packages -Destination ${{ github.workspace }}\net481pb -Recurse | |
| Copy-Item -Path ${{ github.workspace }}\packages -Destination ${{ github.workspace }}\net481SQL-server -Recurse | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build solution for testing | |
| run: | | |
| msbuild "simple-.net-Crypting-For-PowerBuilder.sln" /p:Configuration=Debug | |
| dotnet build "NET8/NET8.csproj" --configuration Debug --arch x64 | |
| - name: Install NUnit Console Runner | |
| run: nuget install NUnit.ConsoleRunner -Version 3.19.1 -OutputDirectory testrunner | |
| - name: Run Tests dll for PB with net 481 | |
| run: .\testrunner\NUnit.ConsoleRunner.3.19.1\tools\nunit3-console.exe ${{ github.workspace }}\net481pb\bin\Debug\SecureLibrary.dll | |
| - name: Run Tests dll for SQL with net 481 | |
| run: .\testrunner\NUnit.ConsoleRunner.3.19.1\tools\nunit3-console.exe ${{ github.workspace }}\net481SQL-server\bin\Debug\SecureLibrary.SQL.dll | |
| - name: Run Tests dll for NET8 | |
| run: dotnet test NET8/NET8.csproj --configuration Debug --arch x64 |