From 4c496f7e996280b8c854b7888ff625e6c2de5a46 Mon Sep 17 00:00:00 2001 From: Arjen Kroezen Date: Wed, 30 Aug 2023 21:16:12 +0200 Subject: [PATCH] ci: add ci.yml --- .github/workflows/ci.yml | 44 +++++++++++++++++++ src/.nuspec | 10 +++++ .../AzureDataFactory.TestingFramework.csproj | 9 +++- src/nuget.config | 12 +++++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 src/.nuspec create mode 100644 src/nuget.config diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ae5e4fdb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + strategy: + matrix: + dotnet-version: [ '7.0.x' ] + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + source-url: https://nuget.pkg.github.com/arjendev/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Install dependencies + run: dotnet restore + working-directory: ./src + - name: Build + run: dotnet build --configuration Release --no-restore + working-directory: ./src + - name: Test + run: dotnet test --no-restore --verbosity normal + working-directory: ./src + - name: Upload dotnet test results + uses: actions/upload-artifact@v3 + with: + name: dotnet-results-${{ matrix.dotnet-version }} + path: ./src/TestResults-${{ matrix.dotnet-version }} + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }} + - name: Create the package + run: dotnet pack --configuration Release src/AzureDataFactory.TestingFramework + - name: Publish the package to GPR + run: dotnet nuget push src/AzureDataFactory.TestingFramework/bin/Release/*.nupkg --source "https://nuget.pkg.github.com/arjendev/index.json" --api-key ${{ secrets.PUBLISH_KEY }} \ No newline at end of file diff --git a/src/.nuspec b/src/.nuspec new file mode 100644 index 00000000..cca4aefd --- /dev/null +++ b/src/.nuspec @@ -0,0 +1,10 @@ + + + + + AzureDataFactory.TestingFramework + 0.1.0 + A unit test framework that allows you to write unit and functional tests for Azure Data Factory v2 against the git integrated json resource files. + arjendev + + \ No newline at end of file diff --git a/src/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj b/src/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj index 2459efd4..e591008e 100644 --- a/src/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj +++ b/src/AzureDataFactory.TestingFramework/AzureDataFactory.TestingFramework.csproj @@ -3,7 +3,6 @@ net7.0 enable enable - https://azuresdkartifacts.blob.core.windows.net/azure-sdk-tools/index.json annotations true @@ -11,8 +10,14 @@ - + + + AzureDataFactory.TestingFramework + 0.1.0-alpha + arjendev + true + diff --git a/src/nuget.config b/src/nuget.config new file mode 100644 index 00000000..40f5bd08 --- /dev/null +++ b/src/nuget.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file