Skip to content

Commit

Permalink
Enabling functional tests (#305)
Browse files Browse the repository at this point in the history
* Enabling functional tests

* trying 64 bit

* Disabled functional tests again

* Fixed the code coverage

* REmoved self-contained

* fix to chrome.exe copy

* enabling self-contained

* fix to build

* removed duplicate property

* 64bit compile

* Added property to web app

* added  --self-contained false

* removed  --self-contained false for functional tests

* GIving up on 64 bit

* Another combination
  • Loading branch information
samsmithnz authored Apr 3, 2021
1 parent ccea5a2 commit 240587e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 72 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,33 @@ jobs:

#Publish dotnet objects
- name: DotNet Publish Web Service
run: dotnet publish FeatureFlags/FeatureFlags.Service/FeatureFlags.Service.csproj --configuration ${{ env.dotNetConfiguration }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --self-contained true --runtime ${{env.runtimeTarget}}
run: dotnet publish FeatureFlags/FeatureFlags.Service/FeatureFlags.Service.csproj --configuration ${{ env.dotNetConfiguration }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ${{ github.workspace }}/webservice --runtime ${{env.runtimeTarget}} --self-contained false # --self-contained true --runtime ${{env.runtimeTarget}}
- name: DotNet Publish Web Site
run: dotnet publish FeatureFlags/FeatureFlags.Web/FeatureFlags.Web.csproj --configuration ${{ env.dotNetConfiguration }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --self-contained true --runtime ${{env.runtimeTarget}}
run: dotnet publish FeatureFlags/FeatureFlags.Web/FeatureFlags.Web.csproj --configuration ${{ env.dotNetConfiguration }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ${{ github.workspace }}/web --runtime ${{env.runtimeTarget}} --self-contained false # --self-contained true --runtime ${{env.runtimeTarget}}
- name: DotNet build functional tests
run: dotnet build FeatureFlags/FeatureFlags.FunctionalTests/FeatureFlags.FunctionalTests.csproj --configuration ${{ env.dotNetConfiguration }} --runtime ${{env.runtimeTarget}} #--self-contained false #--self-contained true --runtime ${{env.runtimeTarget}}
- name: DotNet Publish functional tests
run: dotnet publish FeatureFlags/FeatureFlags.FunctionalTests/FeatureFlags.FunctionalTests.csproj --configuration ${{ env.dotNetConfiguration }} --self-contained true --runtime ${{env.runtimeTarget}}
run: dotnet publish FeatureFlags/FeatureFlags.FunctionalTests/FeatureFlags.FunctionalTests.csproj --configuration ${{ env.dotNetConfiguration }} --output ${{ github.workspace }}/functionalTests --runtime ${{env.runtimeTarget}} --self-contained false # --self-contained true --runtime ${{env.runtimeTarget}}
- name: Copy chromedriver for functional test
run: copy "FeatureFlags/FeatureFlags.FunctionalTests/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/chromedriver.exe" "FeatureFlags/FeatureFlags.FunctionalTests/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/publish"
run: copy "FeatureFlags/FeatureFlags.FunctionalTests/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/chromedriver.exe" "${{ github.workspace }}/functionalTests"
shell: powershell

#Publish build artifacts to GitHub
- name: Upload web service build artifacts back to GitHub
uses: actions/upload-artifact@master
with:
name: serviceapp
path: FeatureFlags/FeatureFlags.Service/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/publish
path: ${{ github.workspace }}/webservice
- name: Upload website build artifacts back to GitHub
uses: actions/upload-artifact@master
with:
name: webapp
path: FeatureFlags/FeatureFlags.Web/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/publish
path: ${{ github.workspace }}/web
- name: Upload function test build artifacts back to GitHub
uses: actions/upload-artifact@master
with:
name: functionaltests
path: FeatureFlags/FeatureFlags.FunctionalTests/bin/${{ env.dotNetConfiguration }}/${{ env.dotNetVersion }}/${{env.runtimeTarget}}/publish
path: ${{ github.workspace }}/functionalTests

test:
runs-on: windows-latest
Expand Down
65 changes: 0 additions & 65 deletions FeatureFlags/FeatureFlags.Service/Controllers/ValuesController.cs

This file was deleted.

1 change: 1 addition & 0 deletions FeatureFlags/FeatureFlags.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace FeatureFlags.Service
{
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public class Program
{
public static void Main(string[] args)
Expand Down
1 change: 1 addition & 0 deletions FeatureFlags/FeatureFlags.Service/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace FeatureFlags.Service
{
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
Expand Down

0 comments on commit 240587e

Please sign in to comment.