Skip to content

refactor: contextos delimitados #34

refactor: contextos delimitados

refactor: contextos delimitados #34

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: MeuPonto.Web (Cosmos)
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
include-prerelease: false
- name: Test Specs (Web)
run: dotnet test specs/MeuPonto.Specs/MeuPonto.Specs.csproj --configuration Release --verbosity normal --filter:"Category!=wip"
- name: Test Use Cases (Web)
run: dotnet test specs/MeuPonto.UseCases/MeuPonto.UseCases.csproj --configuration Release --verbosity normal --filter:"Category!=wip"
- name: Test Web
run: dotnet test tests/MeuPonto.Web.Tests/MeuPonto.Web.Tests.csproj --configuration Release --verbosity normal
- name: Build Web
run: dotnet build src/MeuPonto.Web/MeuPonto.Web.csproj --configuration Release_Cosmos
- name: Publish Web
run: dotnet publish src/MeuPonto.Web/MeuPonto.Web.csproj --configuration Release_Cosmos -o ${{env.DOTNET_ROOT}}/myapp
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
deploy-staging:
runs-on: self-hosted
needs: build
environment:
name: 'Staging'
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app
deploy-production:
runs-on: windows-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'meuponto'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_DF97A0858D26457B8DD117CD1C130B55 }}
package: .