diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 0000000..6987211 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,42 @@ +name: Build and Test +env: + DOTNET_NOLOGO: true + +on: [push] + +jobs: + BuildAndTest: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + - name: Build + run: dotnet build ./src/ServiceBus.AttachmentPlugin.sln --configuration Release + - name: Install NPM + uses: actions/setup-node@v1 + with: + node-version: '12' + - run: npm install -g azurite + - shell: bash + name: Run Azurite as a b/g process + run: azurite-blob & + + - name: Run tests + run: dotnet test ./src/ServiceBus.AttachmentPlugin.sln --configuration Release --no-restore --verbosity normal + + - shell: bash + name: Get .nupkg file name + id: vars + run: | + path=$(find . -name "*.nupkg") + echo "::set-output name=nugetPath::$path" + echo ${{ steps.vars.outputs.nugetPath }} + +# - name: Deploy NuGet package to GitHub packages +# uses: tanaka-takayoshi/nuget-publish-to-github-packages-action@v2.1 +# with: +# nupkg-path: '${{ steps.vars.outputs.nugetPath }}' +# repo-owner: 'SeanFeldman' +# gh-user: 'SeanFeldman' +# token: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/ServiceBus.AttachmentPlugin.Tests/ServiceBus.AttachmentPlugin.Tests.csproj b/src/ServiceBus.AttachmentPlugin.Tests/ServiceBus.AttachmentPlugin.Tests.csproj index 986d688..3d20c95 100644 --- a/src/ServiceBus.AttachmentPlugin.Tests/ServiceBus.AttachmentPlugin.Tests.csproj +++ b/src/ServiceBus.AttachmentPlugin.Tests/ServiceBus.AttachmentPlugin.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/ServiceBus.AttachmentPlugin.sln b/src/ServiceBus.AttachmentPlugin.sln index a87413e..72aef9e 100644 --- a/src/ServiceBus.AttachmentPlugin.sln +++ b/src/ServiceBus.AttachmentPlugin.sln @@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Directory.Build.props = Directory.Build.props ..\README.md = ..\README.md ..\README.source.md = ..\README.source.md + ..\.github\workflows\dotnetcore.yml = ..\.github\workflows\dotnetcore.yml EndProjectSection EndProject Global