Skip to content

Commit

Permalink
ci: add ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arjendev committed Aug 30, 2023
1 parent 65c1d1d commit 488086d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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.GITHUB_TOKEN }} --store-password-in-clear-text
10 changes: 10 additions & 0 deletions src/.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- Required elements-->
<id>AzureDataFactory.TestingFramework</id>
<version>0.1.0</version>
<description>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.</description>
<authors>arjendev</authors>
</metadata>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestoreAdditionalProjectSources>https://azuresdkartifacts.blob.core.windows.net/azure-sdk-tools/index.json</RestoreAdditionalProjectSources>
<Nullable>annotations</Nullable>
<IncludeGeneratorSharedCode>true</IncludeGeneratorSharedCode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Core.Expressions.DataFactory" Version="1.0.0-beta.4" />
<PackageReference Include="Azure.ResourceManager" Version="1.7.0" />
<PackageReference Include="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230804.1" />
<PackageReference Include="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230804.1" PrivateAssets="All" />

</ItemGroup>

<PropertyGroup>
<PackageId>AzureDataFactory.TestingFramework</PackageId>
<PackageVersion>0.1.0-alpha</PackageVersion>
<Authors>arjendev</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions src/nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="AzureSdkFeed" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="github" value="https://nuget.pkg.github.com/arjendev/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>

0 comments on commit 488086d

Please sign in to comment.