-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from kevbite/issue_191
Move to GitHub actions
- Loading branch information
Showing
180 changed files
with
146 additions
and
191 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Continuous Integration Workflow | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: 7.12.${{ github.run_number }}-preview | ||
DOCKER_BUILDKIT: 1 | ||
BUILDKIT_PROGRESS: plain | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
- name: Docker Build NuGet packages | ||
run: | | ||
docker build --build-arg NUGET_PACKAGE_VERSION=${{ env.VERSION }} --build-arg COMPANIES_HOUSE_API_KEY=${{ secrets.COMPANIES_HOUSE_API_KEY }} -f ./Dockerfile --output ./ . | ||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
trx_files: TestResults/**/*.trx | ||
- name: NuGet.Org push | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
dotnet nuget push ./artifacts/*.nupkg --source NuGet.org --api-key ${{ secrets.NUGET_API_KEY }} | ||
- name: Create Release | ||
id: create_release | ||
if: github.ref == 'refs/heads/master' | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
release_name: Release ${{ env.VERSION }} | ||
body: | | ||
Release ${{ env.VERSION }} | ||
draft: false | ||
prerelease: false |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Authors>Kevin Smith</Authors> | ||
<Company>Kevsoft</Company> | ||
<Copyright>Copyright © Kevsoft 2020</Copyright> | ||
|
||
<PackageTags>CompaniesHouse;Registrar;Kevsoft;API;REST;WebService</PackageTags> | ||
<PackageIconUrl>https://raw.githubusercontent.com/kevbite/CompaniesHouse.NET/master/companies-house.jpg</PackageIconUrl> | ||
<PackageIcon>companies-house.jpg</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/kevbite/CompaniesHouse.NET</PackageProjectUrl> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/kevbite/CompaniesHouse.NET</RepositoryUrl> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<Project> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ARG CONFIGURATION="Release" | ||
ARG NUGET_PACKAGE_VERSION="1.0.0" | ||
ARG COMPANIES_HOUSE_API_KEY | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS restore | ||
|
||
ARG CONFIGURATION | ||
|
||
COPY ./*.props . | ||
COPY ./*.targets . | ||
COPY ./*.sln . | ||
COPY ./*.jpg . | ||
COPY ./README.md . | ||
COPY ./LICENSE . | ||
|
||
COPY ./src/CompaniesHouse/*.csproj ./src/CompaniesHouse/ | ||
COPY ./src/CompaniesHouse.Extensions.Microsoft.DependencyInjection/*.csproj ./src/CompaniesHouse.Extensions.Microsoft.DependencyInjection/ | ||
COPY ./tests/CompaniesHouse.Extensions.Microsoft.DependencyInjection.Tests/*.csproj ./tests/CompaniesHouse.Extensions.Microsoft.DependencyInjection.Tests/ | ||
COPY ./tests/CompaniesHouse.IntegrationTests/*.csproj ./tests/CompaniesHouse.IntegrationTests/ | ||
COPY ./tests/CompaniesHouse.ScenarioTests/*.csproj ./tests/CompaniesHouse.ScenarioTests/ | ||
COPY ./tests/CompaniesHouse.Tests/*.csproj ./tests/CompaniesHouse.Tests/ | ||
COPY ./samples/SampleProject/*.csproj ./samples/SampleProject/ | ||
RUN dotnet restore | ||
|
||
FROM restore as build | ||
ARG CONFIGURATION | ||
ARG NUGET_PACKAGE_VERSION | ||
|
||
COPY ./src/ ./src/ | ||
COPY ./tests/ ./tests/ | ||
COPY ./samples/ ./samples/ | ||
RUN dotnet build --configuration $CONFIGURATION --no-restore | ||
|
||
FROM build as test | ||
ARG COMPANIES_HOUSE_API_KEY | ||
RUN dotnet test --logger trx --configuration $CONFIGURATION --no-build | ||
|
||
FROM build as pack | ||
RUN mkdir -p artifacts | ||
RUN dotnet pack --configuration Release -p:Version=${NUGET_PACKAGE_VERSION} --no-build --output ./artifacts | ||
|
||
FROM scratch | ||
COPY --from=pack /artifacts/*.nupkg /artifacts/ | ||
COPY --from=pack /artifacts/*.snupkg /artifacts/ | ||
COPY --from=test /tests/CompaniesHouse.Extensions.Microsoft.DependencyInjection.Tests/TestResults/*.trx /TestResults/CompaniesHouse.Extensions.Microsoft.DependencyInjection.Tests/ | ||
COPY --from=test /tests/CompaniesHouse.IntegrationTests/TestResults/*.trx /TestResults/CompaniesHouse.IntegrationTests/ | ||
COPY --from=test /tests/CompaniesHouse.ScenarioTests/TestResults/*.trx /TestResults/CompaniesHouse.ScenarioTests/ | ||
COPY --from=test /tests/CompaniesHouse.Tests/TestResults/*.trx /TestResults/CompaniesHouse.Tests/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\CompaniesHouse\CompaniesHouse.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
File renamed without changes.
Oops, something went wrong.