feat(Workflow) Now have a testing part of deploy workflow

This commit is contained in:
2022-04-27 21:14:27 -04:00
parent d2c8c2db74
commit 156339786c
5 changed files with 55 additions and 20 deletions
+20 -13
View File
@@ -1,4 +1,4 @@
name: Azure Static Web Apps CI/CD
name: Deploy To Development
on:
push:
@@ -11,11 +11,11 @@ on:
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
if: github.event_name == 'push'
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Build And Deploy
@@ -28,15 +28,22 @@ jobs:
app_location: "IGP"
api_location: ""
output_location: "./wwwroot"
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
test_deployed_website:
name: Test Deployed Website
needs: build_and_deploy_job
if: github.event_name == 'push'
runs-on: ubuntu-latest
name: Close Pull Request Job
defaults:
run:
working-directory: ./TestAutomation
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_MUD_04916B210 }}
action: "close"
- uses: browser-actions/setup-geckodriver@latest
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.*
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet test --no-build --verbosity normal
+1 -1
View File
@@ -1,4 +1,4 @@
name: Azure Static Web Apps CI/CD
name: Deploy To Production
on:
push:
+25
View File
@@ -0,0 +1,25 @@
name: Run Development Tests
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 5.0.x
- name: Change Directory
run: cd TestAutomation | dotnet restore |dotnet build --no-restore | dotnet test --no-build --verbosity normal