Skip to content

Commit

Permalink
tests en paralelo a build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdepetrisd committed Mar 18, 2024
1 parent 311a5a9 commit c1493e9
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/release_webapi-tienda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,40 @@ jobs:
- name: Build with dotnet
run: dotnet build ${{ env.APP_PROJECT_PATH }} --configuration main --no-restore

- name: Run SpecFlow Tests
uses: cryptic-wizard/[email protected]
with:
test-assembly-path: test/SpecFlowTests/bin/Release/net8.0/SpecFlowTests.dll
test-execution-json: test/SpecFlowTests/bin/Release/net8.0/TestExecution.json

- name: dotnet publish
- name: Publish with dotnet
run: dotnet publish ${{ env.APP_PROJECT_PATH }} --configuration main --no-build --output ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: ${{ env.AZURE_WEBAPP_JOB_ARTIFACT }}
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

test:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore ${{ env.APP_PROJECT_PATH }}

- name: Run SpecFlow Tests
uses: cryptic-wizard/[email protected]
with:
test-assembly-path: test/SpecFlowTests/bin/Release/net8.0
test-assembly-dll: SpecFlowTests.dll
test-execution-json: TestExecution.json

deploy:
runs-on: windows-latest
needs: build
needs: [build, test]
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
Expand All @@ -71,4 +87,4 @@ jobs:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D0EE4EE1E5364EA290224CB7943183EF }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D0EE4EE1E5364EA290224CB7943183EF }}

0 comments on commit c1493e9

Please sign in to comment.