Re-enable Integration Tests for TEST Cluster #2143
Workflow file for this run
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
name: Build and test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 6 * * 1,3,5' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet-version: ['6.0.x'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: csharp, javascript | |
- name: Install dependencies | |
run: | | |
cd src | |
dotnet restore | |
- name: Build | |
run: | | |
cd src | |
dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
cd src | |
dotnet test --no-restore --verbosity normal --logger:trx --collect:"XPlat Code Coverage" --results-directory ./TestResults | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: DotNet Tests # Name of the check run which will be created | |
path: | | |
**/*.trx | |
reporter: dotnet-trx # Format of test results | |
- name: Copy Coverage report | |
run: cp src/TestResults/**/coverage.cobertura.xml coverage.cobertura.xml | |
- name: Code coverage report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage.cobertura.xml | |
badge: true | |
fail_below_min: true | |
format: markdown | |
indicators: true | |
output: both | |
thresholds: '85 90' | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
yaml-integration-tests-prod: | |
needs: build | |
uses: ./.github/workflows/yaml-integration-tests.yml | |
with: | |
parameters: | |
'[{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/basicgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/buttonclicker/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/calculator/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/connector/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/containers/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanAppIdPreview.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanForScriptInjection.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/nestedgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "ceb95cca-da1d-ed58-8af8-117cb4081f16", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.powerapps.com", "testPlanFile": "../../samples/pcfcomponent/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }]' | |
secrets: inherit | |
yaml-integration-tests-preprod: | |
needs: build | |
uses: ./.github/workflows/yaml-integration-tests.yml | |
with: | |
parameters: | |
'[{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/basicgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" } | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/buttonclicker/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/calculator/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/connector/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/containers/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanAppIdPreprod.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanForScriptInjection.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/nestedgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "98abc6e1-c9ae-e911-9bb3-a30701a3e3d0", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.preprod.powerapps.com", "testPlanFile": "../../samples/pcfcomponent/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }]' | |
secrets: inherit | |
yaml-integration-tests-test: | |
needs: build | |
uses: ./.github/workflows/yaml-integration-tests.yml | |
with: | |
parameters: | |
'[{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/basicgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/buttonclicker/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/calculator/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/connector/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/containers/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanAppIdTest.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/differentvariabletypes/testPlanForScriptInjection.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/nestedgallery/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }, | |
{ "environmentId": "641f1872-0673-e27f-b358-e9b6d7c08073", "tenantId": "f2c52b3d-d88e-4892-9785-d5b7c7016725", "domain": "apps.test.powerapps.com", "testPlanFile": "../../samples/pcfcomponent/testPlan.fx.yaml", "outputDirectory": "../../TestResults" }]' | |
secrets: inherit | |
notification: | |
if: github.event_name == 'schedule' && (failure() || github.run_attempt > 1) #send notification only for schedule failure or reruns | |
needs: [yaml-integration-tests-prod, yaml-integration-tests-preprod, yaml-integration-tests-test] | |
runs-on: ubuntu-latest | |
name: Send Notification To Teams | |
steps: | |
- name: Send a Notification to Teams | |
id: notify | |
uses: thechetantalwar/teams-notify@v2 | |
with: | |
teams_webhook_url: ${{ secrets.TEAM_HOOK }} | |
message: "${{ job.status }}: Github Action ${{ github.run_number }} (attempt #${{ github.run_attempt }}) triggered by ${{ github.triggering_actor }}. See https://github.com/microsoft/PowerApps-TestEngine/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }} details." |