From 6b158e971629495b2001184d6bd2ce8771dc568f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 15:58:52 +0300 Subject: [PATCH 01/53] Add scoping for workflow --- .github/workflows/screener-build.yml | 170 +++++++++++++++++++++-- .github/workflows/screener-run.yml | 88 ++++++++++-- azure-pipelines.yml | 195 --------------------------- 3 files changed, 234 insertions(+), 219 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 376ccc79b78f84..fbb3656b3008a1 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -1,20 +1,29 @@ name: Screener build -on: workflow_dispatch +on: + pull_request: + push: + branches: + - master + workflow_dispatch: + +env: + BROWSERSLIST_IGNORE_OLD_DATA: true + DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' + BUILD_BUILDID: ${{ github.run_id }} + BUILD_SOURCEBRANCH: ${{ github.ref }} jobs: environment-upload: runs-on: ubuntu-latest steps: - run: mkdir artifacts - ########################################### # Environment variables are passed as an artifact so that the run workflow # can download and access them. There are two workflows used- `screener-build.yml` # and `screener-run.yml` so that the screener checks can also be triggered by # pull requests from forks. Note: This is a temporary change. ########################################### - ########################################### # BROWSERSLIST_IGNORE_OLD_DATA = Prevents failures on CI when "caniuse-lite" becomes outdated # DEPLOYHOST = address of host for screener tests deployment @@ -28,8 +37,8 @@ jobs: DEPLOYHOST='fluentuipr.z22.web.core.windows.net' BUILD_BUILDID=${{ github.run_id }} BUILD_SOURCEBRANCH=${{ github.ref }} + SCREENER_BUILD=1 EOT - ########################################### # SYSTEM_PULLREQUEST_TARGETBRANCH = target branch name # SYSTEM_PULLREQUEST_SOURCEBRANCH = source branch name @@ -75,14 +84,59 @@ jobs: screener-react-northstar: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react-northstar - steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set env variables if there is a PR + run: | + echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + echo "ISPR=true" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV + env: + DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' + PR_NUMBER: ${{ github.event.number }} + if: ${{startsWith(github.ref, 'refs/pull/')}} + + - name: Set env variables if there is not a PR + run: | + echo "ISPR=false" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV + if: ${{!startsWith(github.ref, 'refs/pull/')}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if northstar packages were affected (PR) + if: ${{env.ISPR == 'true'}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if northstar packages were affected + if: ${{env.ISPR = 'false'}} + - name: Log environment variables (Linux) if: runner.os == 'Linux' run: | @@ -101,22 +155,69 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react - steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set env variables if there is a PR + run: | + echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + echo "ISPR=true" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV + env: + DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' + PR_NUMBER: ${{ github.event.number }} + if: ${{startsWith(github.ref, 'refs/pull/')}} + + - name: Set env variables if there is not a PR + run: | + echo "ISPR=false" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV + if: ${{!startsWith(github.ref, 'refs/pull/')}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if v8 packages were affected + if: ${{env.ISPR == 'true'}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if v8 packages were affected + if: ${{env.ISPR = 'false'}} + - name: Log environment variables (Linux) if: runner.os == 'Linux' run: | @@ -133,22 +234,69 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react-components: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react-components - steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set env variables if there is a PR + run: | + echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV + echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV + echo "ISPR=true" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV + env: + DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' + PR_NUMBER: ${{ github.event.number }} + if: ${{startsWith(github.ref, 'refs/pull/')}} + + - name: Set env variables if there is not a PR + run: | + echo "ISPR=false" >> $GITHUB_ENV + echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV + echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV + if: ${{!startsWith(github.ref, 'refs/pull/')}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if v9 packages were affected + if: ${{env.ISPR == 'true'}} + + - run: | + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components) + if [[ $packageAffected == false ]]; then + echo "Should skip screener" + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "Should NOT skip screener" + fi + name: Check if v9 packages were affected + if: ${{env.ISPR == 'false'}} + - name: Log environment variables (Linux) if: runner.os == 'Linux' run: | @@ -165,8 +313,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 3eb31b69fae017..ed5db0dd8e29ab 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -1,25 +1,19 @@ name: Screener run - on: workflow_run: workflows: - Screener build types: - completed - env: AZURE_STORAGE_CONNECTION_STRING: ${{secrets.AZURE_STORAGE_CONNECTION_STRING}} - jobs: screener-react-northstar: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react-northstar - steps: - uses: actions/checkout@v3 with: - ref: ${{github.event.workflow_run.head_branch}} fetch-depth: 0 - uses: actions/setup-node@v3 @@ -27,6 +21,27 @@ jobs: node-version: 14.18.1 cache: 'yarn' + - name: Check if test app artifact deployed + uses: actions/github-script@v6 + id: skip-screener + with: + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == "northstar-artifact" + })[0]; + if(!matchArtifact) + return 'false' + return 'true' + result-encoding: string + + - name: Set env variable for skipping screener + run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 with: @@ -42,6 +57,7 @@ jobs: name: northstar-artifact # downloads artifact to where it would be 'built' path: packages/fluentui/docs/dist + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} - name: Define env variables run: | @@ -50,6 +66,7 @@ jobs: do echo "$line" >> $GITHUB_ENV done < "$input_file" + - name: Log environment variables (Linux) if: runner.os == 'Linux' run: | @@ -64,6 +81,8 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' -s 'packages/fluentui/docs/dist' --overwrite + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + - name: Start @fluentui/react-northstar VR Test run: yarn workspace @fluentui/docs vr:test env: @@ -73,13 +92,10 @@ jobs: screener-react: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react - steps: - uses: actions/checkout@v3 with: - ref: ${{github.event.workflow_run.head_branch}} fetch-depth: 0 - uses: actions/setup-node@v3 @@ -87,6 +103,27 @@ jobs: node-version: 14.18.1 cache: 'yarn' + - name: Check if test app artifact deployed + uses: actions/github-script@v6 + id: skip-screener + with: + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == "screener-artifact" + })[0]; + if(!matchArtifact) + return 'false' + return 'true' + result-encoding: string + + - name: Set env variable for skipping screener + run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 with: @@ -101,7 +138,7 @@ jobs: workflow_conclusion: success name: screener-artifact path: apps/vr-tests/dist/storybook - + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} - name: Define env variables run: | input_file="environment" @@ -109,6 +146,7 @@ jobs: do echo "$line" >> $GITHUB_ENV done < "$input_file" + - name: Log environment variables (Linux) if: runner.os == 'Linux' run: | @@ -117,12 +155,13 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - - name: Upload @fluentui/react VR test site uses: azure/CLI@v1 with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-screener' -s 'apps/vr-tests/dist/storybook' --overwrite + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + - name: Start @fluentui/react VR Test run: yarn workspace @fluentui/vr-tests screener env: @@ -132,13 +171,10 @@ jobs: screener-react-components: runs-on: 'ubuntu-latest' - name: Screener @fluentui/react-components - steps: - uses: actions/checkout@v3 with: - ref: ${{github.event.workflow_run.head_branch}} fetch-depth: 0 - uses: actions/setup-node@v3 @@ -146,6 +182,27 @@ jobs: node-version: 14.18.1 cache: 'yarn' + - name: Check if test app artifact deployed + uses: actions/github-script@v6 + id: skip-screener + with: + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == "vnext-artifact" + })[0]; + if(!matchArtifact) + return 'false' + return 'true' + result-encoding: string + + - name: Set env variable for skipping screener + run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 with: @@ -160,6 +217,7 @@ jobs: workflow_conclusion: success name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} - name: Define env variables run: | @@ -183,6 +241,8 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-components-screener' -s 'apps/vr-tests-react-components/dist/storybook' --overwrite + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + - name: Start @fluentui/react-components VR Test run: yarn workspace @fluentui/vr-tests-react-components screener env: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a7e5a85185d55d..a68b0f019512df 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -109,198 +109,3 @@ jobs: displayName: Cypress E2E tests - template: .devops/templates/cleanup.yml - - - job: ScreenerNorthstar - displayName: Screener @fluentui/react-northstar - workspace: - clean: all - steps: - - template: .devops/templates/tools.yml - - - task: Bash@3 - inputs: - filePath: yarn-ci.sh - displayName: yarn - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffectedPR - displayName: Check if northstar packages were affected - condition: eq(variables['isPR'], 'true') - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffected - displayName: Check if northstar packages were affected - condition: eq(variables['isPR'], 'false') - - - script: | - yarn workspace @fluentui/docs vr:build - displayName: build FUI N* VR Test - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - env: - SCREENER_BUILD: 1 - - - task: AzureUpload@2 - displayName: Upload N* VR test site - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - inputs: - azureSubscription: $(azureSubscription) - BlobPrefix: $(deployBasePath)/react-northstar-screener - CacheControl: 'public, max-age=600000' - ContainerName: '$web' - SourcePath: 'packages/fluentui/docs/dist' - storage: $(azureStorage) - - - script: yarn workspace @fluentui/docs vr:test - displayName: Start @fluentui/react-northstar VR Test - env: - SCREENER_ENDPOINT: $(screenerApiUri) - SCREENER_PROXY_ENDPOINT: $(screenerProxyUri) - SCREENER_API_KEY: $(screener.key) - - - template: .devops/templates/cleanup.yml - - - job: Screener - displayName: Screener @fluentui/react - workspace: - clean: all - steps: - - template: .devops/templates/tools.yml - - - task: Bash@3 - inputs: - filePath: yarn-ci.sh - displayName: yarn - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffectedPR - displayName: Check if v8 packages were affected - condition: eq(variables['isPR'], 'true') - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffected - displayName: Check if v8 packages were affected - condition: eq(variables['isPR'], 'false') - - - script: | - yarn workspace @fluentui/vr-tests screener:build - displayName: build vr-tests storybook - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - - - task: AzureUpload@2 - displayName: Upload @fluentui/react VR test site - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - inputs: - azureSubscription: $(azureSubscription) - BlobPrefix: $(deployBasePath)/react-screener - CacheControl: 'public, max-age=600000' - ContainerName: '$web' - SourcePath: 'apps/vr-tests/dist/storybook' - storage: $(azureStorage) - - # Don't use lage here because it eats long output for reasons that are hard to debug - - script: | - yarn workspace @fluentui/vr-tests screener - displayName: Start @fluentui/react VR Test - env: - SCREENER_ENDPOINT: $(screenerApiUri) - SCREENER_PROXY_ENDPOINT: $(screenerProxyUri) - SCREENER_API_KEY: $(screener.key) - - - template: .devops/templates/cleanup.yml - - - job: ScreenerVNext - displayName: Screener @fluentui/react-components - workspace: - clean: all - steps: - - template: .devops/templates/tools.yml - - - task: Bash@3 - inputs: - filePath: yarn-ci.sh - displayName: yarn - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffectedPR - displayName: Check if v9 packages were affected - condition: eq(variables['isPR'], 'true') - - - script: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components) - if [[ $packageAffected == false ]]; then - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]true" - echo "Should skip screener" - else - echo "##vso[task.setvariable variable=SKIP_SCREENER_BUILD]false" - echo "Should NOT skip screener" - fi - name: PackagesAffected - displayName: Check if v9 packages were affected - condition: eq(variables['isPR'], 'false') - - - script: | - yarn workspace @fluentui/vr-tests-react-components screener:build - displayName: build vr-tests-react-components storybook - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - - - task: AzureUpload@2 - displayName: Upload @fluentui/react-components VR test site - condition: ne(variables['SKIP_SCREENER_BUILD'], 'true') - inputs: - azureSubscription: $(azureSubscription) - BlobPrefix: $(deployBasePath)/react-components-screener - CacheControl: 'public, max-age=600000' - ContainerName: '$web' - SourcePath: 'apps/vr-tests-react-components/dist/storybook' - storage: $(azureStorage) - - # Don't use lage here because it eats long output for reasons that are hard to debug - - script: | - yarn workspace @fluentui/vr-tests-react-components screener - displayName: Start @fluentui/react-components VR Test - env: - SCREENER_ENDPOINT: $(screenerApiUri) - SCREENER_PROXY_ENDPOINT: $(screenerProxyUri) - SCREENER_API_KEY: $(screener.key) - - - template: .devops/templates/cleanup.yml From b6636d562bd5aa6b01a27feb5cc5792a1dabeb3f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 16:11:14 +0300 Subject: [PATCH 02/53] Fix typo from step condition --- .github/workflows/screener-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index fbb3656b3008a1..fc4ace0622e70d 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -135,7 +135,7 @@ jobs: echo "Should NOT skip screener" fi name: Check if northstar packages were affected - if: ${{env.ISPR = 'false'}} + if: ${{env.ISPR == 'false'}} - name: Log environment variables (Linux) if: runner.os == 'Linux' @@ -216,7 +216,7 @@ jobs: echo "Should NOT skip screener" fi name: Check if v8 packages were affected - if: ${{env.ISPR = 'false'}} + if: ${{env.ISPR == 'false'}} - name: Log environment variables (Linux) if: runner.os == 'Linux' From e606ec0d434139247989d36f043296d9e25f7367 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 16:27:21 +0300 Subject: [PATCH 03/53] Change order of job steps --- .github/workflows/screener-build.yml | 48 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index fc4ace0622e70d..06f72ffba3aca4 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -113,6 +113,14 @@ jobs: echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV if: ${{!startsWith(github.ref, 'refs/pull/')}} + - uses: actions/setup-node@v3 + with: + node-version: 14.18.1 + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + - run: | packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr) if [[ $packageAffected == false ]]; then @@ -143,14 +151,6 @@ jobs: printenv | sort ;\ echo "SHELLOPTS $SHELLOPTS" ;\ - - uses: actions/setup-node@v3 - with: - node-version: 14.18.1 - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: build FUI N* VR Test run: yarn workspace @fluentui/docs vr:build env: @@ -194,6 +194,14 @@ jobs: echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV if: ${{!startsWith(github.ref, 'refs/pull/')}} + - uses: actions/setup-node@v3 + with: + node-version: 14.18.1 + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + - run: | packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr) if [[ $packageAffected == false ]]; then @@ -224,14 +232,6 @@ jobs: printenv | sort ;\ echo "SHELLOPTS $SHELLOPTS" ;\ - - uses: actions/setup-node@v3 - with: - node-version: 14.18.1 - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build if: ${{env.SKIP_SCREENER_BUILD == 'false'}} @@ -273,6 +273,14 @@ jobs: echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV if: ${{!startsWith(github.ref, 'refs/pull/')}} + - uses: actions/setup-node@v3 + with: + node-version: 14.18.1 + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + - run: | packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr) if [[ $packageAffected == false ]]; then @@ -303,14 +311,6 @@ jobs: printenv | sort ;\ echo "SHELLOPTS $SHELLOPTS" ;\ - - uses: actions/setup-node@v3 - with: - node-version: 14.18.1 - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build if: ${{env.SKIP_SCREENER_BUILD == 'false'}} From 62511198ae7b61a8da7a879e990bfb155384abb7 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 17:21:14 +0300 Subject: [PATCH 04/53] Checkout PR source branch --- .github/workflows/screener-run.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index ed5db0dd8e29ab..4c1e06c45fc899 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -15,6 +15,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -97,6 +98,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -176,6 +178,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: From 1578d8a1793761cb86f68a0b920ee2b1bccb7bde Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 17:46:26 +0300 Subject: [PATCH 05/53] Change trigger event --- .github/workflows/screener-run.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 4c1e06c45fc899..7ea570d2608d7d 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -1,10 +1,12 @@ name: Screener run on: - workflow_run: - workflows: - - Screener build - types: - - completed + pull_request: + + #workflow_run: + # workflows: + # - Screener build + # types: + # - completed env: AZURE_STORAGE_CONNECTION_STRING: ${{secrets.AZURE_STORAGE_CONNECTION_STRING}} jobs: From a392b53af3b468800f1597f71379d5162a22d04e Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 18:02:32 +0300 Subject: [PATCH 06/53] Use previous run as mock trigger for testing purposes --- .github/workflows/screener-run.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 7ea570d2608d7d..031aaa88426fbd 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -17,7 +17,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -32,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: context.payload.workflow_run.id, + run_id: 2912475509, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -100,7 +99,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -115,7 +113,8 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: context.payload.workflow_run.id, + //run_id: context.payload.workflow_run.id, + run_id: 2912475509, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -180,7 +179,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -195,7 +193,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: context.payload.workflow_run.id, + run_id: 2912475509, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From 1eb168acb4ca0f4cf53d55d896857bdf9829a6a6 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 18:14:19 +0300 Subject: [PATCH 07/53] Update proxy endpoint --- scripts/screener/screener.runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index a7915bddb20e12..5dd4abcb9c2f55 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -46,7 +46,7 @@ async function scheduleScreenerBuild( pullRequest: buildInfo.pullRequest, }; - const response = await fetch(environment.screener.proxyUri.replace('ci', 'runner'), { + const response = await fetch(`${environment.screener.proxyUri}/api/runner`, { method: 'post', headers: { 'Content-Type': 'application/json', From fc50023b84f8d3dc39fca1a6a813bb4c83fe5d62 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 19:06:12 +0300 Subject: [PATCH 08/53] Use previous run as mock trigger for testing purposes --- .github/workflows/screener-run.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 031aaa88426fbd..e2487550a404c6 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2912475509, + run_id: 2912676079, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -114,7 +114,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2912475509, + run_id: 2912676079, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" From 6159b6cfdf395c021b3a475e73a67f960a238369 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 19:32:32 +0300 Subject: [PATCH 09/53] Fix logic error --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index e2487550a404c6..e4ee39390bd061 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -36,7 +36,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" })[0]; - if(!matchArtifact) + if(matchArtifact !== undefined) return 'false' return 'true' result-encoding: string @@ -119,7 +119,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" })[0]; - if(!matchArtifact) + if(matchArtifact !== undefined) return 'false' return 'true' result-encoding: string @@ -198,7 +198,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" })[0]; - if(!matchArtifact) + if(matchArtifact !== undefined) return 'false' return 'true' result-encoding: string From 5a5ad66574934bfb48783bbcfb51228d31928403 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 19:48:42 +0300 Subject: [PATCH 10/53] Not uploading storybook for testing purposes --- .github/workflows/screener-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 06f72ffba3aca4..3e4b544a848198 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -319,4 +319,4 @@ jobs: with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} From 535422e6ae7820102fd532be9ac475aca45b6d2f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 23 Aug 2022 19:58:05 +0300 Subject: [PATCH 11/53] Restore condition for build artifact upload --- .github/workflows/screener-build.yml | 2 +- .github/workflows/screener-run.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 3e4b544a848198..06f72ffba3aca4 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -319,4 +319,4 @@ jobs: with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index e4ee39390bd061..49bbb90516c21d 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2912676079, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -114,7 +114,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2912676079, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -193,7 +193,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2912475509, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From e25116f5ea1ec70b1ea44d1cfe6cd952950d909f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 10:19:35 +0300 Subject: [PATCH 12/53] do not upload N* build for testing purposes --- .github/workflows/screener-build.yml | 2 +- .github/workflows/screener-run.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 06f72ffba3aca4..fb762dc15d40de 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -161,7 +161,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react: runs-on: 'ubuntu-latest' diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 49bbb90516c21d..43c7ffd89deeb7 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -142,6 +142,7 @@ jobs: name: screener-artifact path: apps/vr-tests/dist/storybook if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + - name: Define env variables run: | input_file="environment" From 750d8c1cff8e3c3bb6773543a483ccaa2da2111d Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 10:41:23 +0300 Subject: [PATCH 13/53] Test case of skipping N* build --- .github/workflows/screener-build.yml | 2 +- .github/workflows/screener-run.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index fb762dc15d40de..06f72ffba3aca4 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -161,7 +161,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 43c7ffd89deeb7..f7bb7bf2e71916 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2913281075, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -114,7 +114,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2913281075, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -194,7 +194,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2913281075, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From 2fd57667cd485f4865c459015bab12ef2d9f82f7 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 12:34:40 +0300 Subject: [PATCH 14/53] Add part of the changes suggested in review --- .github/workflows/screener-build.yml | 145 +++++++-------------------- 1 file changed, 39 insertions(+), 106 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 06f72ffba3aca4..621f00e76874b6 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -58,11 +58,10 @@ jobs: SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }} ISPR=true DEPLOYBASEPATH=pull/$PR_NUMBER - DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER + DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/$PR_NUMBER BUILD_SOURCEBRANCHNAME='merge' EOT env: - DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' PR_NUMBER: ${{ github.event.number }} if: ${{startsWith(github.ref, 'refs/pull/')}} @@ -70,8 +69,8 @@ jobs: run: | cat <> artifacts/environment ISPR=false - DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH - DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH + DEPLOYBASEPATH=heads/${{ github.ref_name }} + DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{ github.ref_name }} BUILD_SOURCEBRANCHNAME=${{ github.ref_name }} EOT if: ${{!startsWith(github.ref, 'refs/pull/')}} @@ -90,28 +89,18 @@ jobs: with: fetch-depth: 0 - - name: Set env variables if there is a PR - run: | - echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV - echo "ISPR=true" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV - env: - DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' - PR_NUMBER: ${{ github.event.number }} - if: ${{startsWith(github.ref, 'refs/pull/')}} + - name: Download env variables artifact + uses: actions/download-artifact@v3 + with: + name: env-artifact - - name: Set env variables if there is not a PR + - name: Define env variables run: | - echo "ISPR=false" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV - if: ${{!startsWith(github.ref, 'refs/pull/')}} + input_file="environment" + while read line + do + echo "$line" >> $GITHUB_ENV + done < "$input_file" - uses: actions/setup-node@v3 with: @@ -122,7 +111,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr) + echo "Is PR build? ${env.ISPR}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr={env.ISPR}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -131,19 +121,6 @@ jobs: echo "Should NOT skip screener" fi name: Check if northstar packages were affected (PR) - if: ${{env.ISPR == 'true'}} - - - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs) - if [[ $packageAffected == false ]]; then - echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV - else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - echo "Should NOT skip screener" - fi - name: Check if northstar packages were affected - if: ${{env.ISPR == 'false'}} - name: Log environment variables (Linux) if: runner.os == 'Linux' @@ -171,28 +148,18 @@ jobs: with: fetch-depth: 0 - - name: Set env variables if there is a PR - run: | - echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV - echo "ISPR=true" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV - env: - DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' - PR_NUMBER: ${{ github.event.number }} - if: ${{startsWith(github.ref, 'refs/pull/')}} + - name: Download a single artifact + uses: actions/download-artifact@v3 + with: + name: env-artifact - - name: Set env variables if there is not a PR + - name: Define env variables run: | - echo "ISPR=false" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV - if: ${{!startsWith(github.ref, 'refs/pull/')}} + input_file="environment" + while read line + do + echo "$line" >> $GITHUB_ENV + done < "$input_file" - uses: actions/setup-node@v3 with: @@ -203,19 +170,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr) - if [[ $packageAffected == false ]]; then - echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV - else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - echo "Should NOT skip screener" - fi - name: Check if v8 packages were affected - if: ${{env.ISPR == 'true'}} - - - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests) + echo "Is PR build? ${env.ISPR}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr={env.ISPR}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -224,7 +180,6 @@ jobs: echo "Should NOT skip screener" fi name: Check if v8 packages were affected - if: ${{env.ISPR == 'false'}} - name: Log environment variables (Linux) if: runner.os == 'Linux' @@ -250,28 +205,18 @@ jobs: with: fetch-depth: 0 - - name: Set env variables if there is a PR - run: | - echo "SYSTEM_PULLREQUEST_TARGETBRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }}" >> $GITHUB_ENV - echo "SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV - echo "ISPR=true" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=pull/$PR_NUMBER" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/pull/$PR_NUMBER" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME='merge'" >> $GITHUB_ENV - env: - DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' - PR_NUMBER: ${{ github.event.number }} - if: ${{startsWith(github.ref, 'refs/pull/')}} + - name: Download a single artifact + uses: actions/download-artifact@v3 + with: + name: env-artifact - - name: Set env variables if there is not a PR + - name: Define env variables run: | - echo "ISPR=false" >> $GITHUB_ENV - echo "DEPLOYBASEPATH=heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "DEPLOYURL=https://$DEPLOYHOST/heads/$SYSTEM_PULLREQUEST_TARGETBRANCH" >> $GITHUB_ENV - echo "BUILD_SOURCEBRANCHNAME=${{ github.ref_name }}" >> $GITHUB_ENV - if: ${{!startsWith(github.ref, 'refs/pull/')}} + input_file="environment" + while read line + do + echo "$line" >> $GITHUB_ENV + done < "$input_file" - uses: actions/setup-node@v3 with: @@ -282,19 +227,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr) - if [[ $packageAffected == false ]]; then - echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV - else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - echo "Should NOT skip screener" - fi - name: Check if v9 packages were affected - if: ${{env.ISPR == 'true'}} - - - run: | - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components) + echo "Is PR build? ${env.ISPR}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${env.ISPR}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -303,7 +237,6 @@ jobs: echo "Should NOT skip screener" fi name: Check if v9 packages were affected - if: ${{env.ISPR == 'false'}} - name: Log environment variables (Linux) if: runner.os == 'Linux' From 2e5417d5be58914b8bc735445fe168f2b47b9f00 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 12:42:37 +0300 Subject: [PATCH 15/53] Fix env variable typo --- .github/workflows/screener-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 621f00e76874b6..3c7a7c1792c474 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -111,8 +111,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${env.ISPR}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr={env.ISPR}) + echo "Is PR build? ${{env.ISPR}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{env.ISPR}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -170,8 +170,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${env.ISPR}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr={env.ISPR}) + echo "Is PR build? ${{env.ISPR}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{env.ISPR}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -227,8 +227,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${env.ISPR}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${env.ISPR}) + echo "Is PR build? ${{env.ISPR}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{env.ISPR}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV From 53aec464fcb99ac2962ee34919661905c040b1ae Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 13:04:00 +0300 Subject: [PATCH 16/53] Remove unnecessary env variable --- .github/workflows/screener-build.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 3c7a7c1792c474..481d131ff6cebc 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -8,10 +8,7 @@ on: workflow_dispatch: env: - BROWSERSLIST_IGNORE_OLD_DATA: true DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' - BUILD_BUILDID: ${{ github.run_id }} - BUILD_SOURCEBRANCH: ${{ github.ref }} jobs: environment-upload: @@ -44,7 +41,6 @@ jobs: # SYSTEM_PULLREQUEST_SOURCEBRANCH = source branch name # SYSTEM_PULLREQUEST_PULLREQUESTID = ID of the PR # SYSTEM_PULLREQUEST_SOURCECOMMITID = commit SHA of PR - # ISPR = true if workflow triggered by PR # DEPLOYBASEPATH = path for deploy URL -> pull/ for PRs # DEPLOYURL= address for tests deployment, uses DEPLOYHOST and DEPLOYBASEPATH # BUILD_SOURCEBRANCHNAME = 'merge' for PRs @@ -56,19 +52,15 @@ jobs: SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }} SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }} SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }} - ISPR=true DEPLOYBASEPATH=pull/$PR_NUMBER - DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/$PR_NUMBER + DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/${{ github.event.number }} BUILD_SOURCEBRANCHNAME='merge' EOT - env: - PR_NUMBER: ${{ github.event.number }} if: ${{startsWith(github.ref, 'refs/pull/')}} - name: Set env variables if there is not a PR run: | cat <> artifacts/environment - ISPR=false DEPLOYBASEPATH=heads/${{ github.ref_name }} DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{ github.ref_name }} BUILD_SOURCEBRANCHNAME=${{ github.ref_name }} @@ -111,8 +103,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${{env.ISPR}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{env.ISPR}}) + echo "Is PR build? ${{!startsWith(github.ref, 'refs/pull/')}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{!startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -170,8 +162,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${{env.ISPR}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{env.ISPR}}) + echo "Is PR build? ${{startsWith(github.ref, 'refs/pull/')}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{!startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV @@ -227,8 +219,8 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${{env.ISPR}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{env.ISPR}}) + echo "Is PR build? ${{!startsWith(github.ref, 'refs/pull/')}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{!startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV From caa1d9407378f887e602bf181e2fdd5060ae9886 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 13:26:53 +0300 Subject: [PATCH 17/53] Change logic regarding env variable usage --- .github/workflows/screener-build.yml | 38 ++++++++++++++-------------- scripts/screener/screener.runner.ts | 2 +- scripts/tasks/screener.ts | 4 +-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 481d131ff6cebc..e86baf0836eea4 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -65,7 +65,7 @@ jobs: DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{ github.ref_name }} BUILD_SOURCEBRANCHNAME=${{ github.ref_name }} EOT - if: ${{!startsWith(github.ref, 'refs/pull/')}} + if: ${{startsWith(github.ref, 'refs/pull/')}} - name: Upload environment variables artifact uses: actions/upload-artifact@v3 @@ -103,16 +103,16 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${{!startsWith(github.ref, 'refs/pull/')}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{!startsWith(github.ref, 'refs/pull/')}}) + echo "Is PR build? ${{startsWith(github.ref, 'refs/pull/')}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi - name: Check if northstar packages were affected (PR) + name: Check if northstar packages were affected - name: Log environment variables (Linux) if: runner.os == 'Linux' @@ -124,13 +124,13 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} screener-react: runs-on: 'ubuntu-latest' @@ -163,12 +163,12 @@ jobs: - run: | echo "Is PR build? ${{startsWith(github.ref, 'refs/pull/')}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{!startsWith(github.ref, 'refs/pull/')}}) + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v8 packages were affected @@ -181,13 +181,13 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} screener-react-components: runs-on: 'ubuntu-latest' @@ -219,13 +219,13 @@ jobs: run: yarn install --frozen-lockfile - run: | - echo "Is PR build? ${{!startsWith(github.ref, 'refs/pull/')}}" - packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{!startsWith(github.ref, 'refs/pull/')}}) + echo "Is PR build? ${{startsWith(github.ref, 'refs/pull/')}}" + packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV else - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV + echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v9 packages were affected @@ -238,10 +238,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index 5dd4abcb9c2f55..def3e6336ac479 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -14,7 +14,7 @@ export const environment = { /** * Determines whether a screener test should be skipped or run **/ - skipScreenerBuild: process.env.SKIP_SCREENER_BUILD, + isScreenerBuild: process.env.IS_ARTIFACT_PRESENT, }, }; diff --git a/scripts/tasks/screener.ts b/scripts/tasks/screener.ts index aa8b72d5c4e70a..fa6324986d19dc 100644 --- a/scripts/tasks/screener.ts +++ b/scripts/tasks/screener.ts @@ -15,8 +15,8 @@ export async function screener() { console.log(JSON.stringify(screenerConfig, null, 2)); try { - console.log(`screener-runner: skip build ${JSON.stringify(environment.screener.skipScreenerBuild)}`); - if (environment.screener.skipScreenerBuild !== 'true') { + console.log(`screener-runner: skip build ${JSON.stringify(environment.screener.isScreenerBuild)}`); + if (environment.screener.isScreenerBuild === 'true') { //Skipping "getScreenerStates()" if artifacts were not build console.log('Running screener test:'); const screenerStates = await getScreenerStates(screenerConfig); From 4a0309c964b81da9e78951e11ebc23d12cfdeb20 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 14:02:29 +0300 Subject: [PATCH 18/53] Test skipping screener for vnext --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index f7bb7bf2e71916..43c7ffd89deeb7 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2917202539, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -114,7 +114,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2917202539, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -194,7 +194,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2917202539, + run_id: 2913281075, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From 72840610ff48f092b301e314b497cee95e5e944a Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 14:11:15 +0300 Subject: [PATCH 19/53] Update env variable name --- .github/workflows/screener-run.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 43c7ffd89deeb7..f34ea0cd3dd760 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -42,7 +42,7 @@ jobs: result-encoding: string - name: Set env variable for skipping screener - run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -59,7 +59,7 @@ jobs: name: northstar-artifact # downloads artifact to where it would be 'built' path: packages/fluentui/docs/dist - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Define env variables run: | @@ -83,7 +83,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' -s 'packages/fluentui/docs/dist' --overwrite - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Start @fluentui/react-northstar VR Test run: yarn workspace @fluentui/docs vr:test @@ -125,7 +125,7 @@ jobs: result-encoding: string - name: Set env variable for skipping screener - run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -141,7 +141,7 @@ jobs: workflow_conclusion: success name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Define env variables run: | @@ -164,7 +164,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-screener' -s 'apps/vr-tests/dist/storybook' --overwrite - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Start @fluentui/react VR Test run: yarn workspace @fluentui/vr-tests screener @@ -205,7 +205,7 @@ jobs: result-encoding: string - name: Set env variable for skipping screener - run: echo "SKIP_SCREENER_BUILD=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -221,7 +221,7 @@ jobs: workflow_conclusion: success name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Define env variables run: | @@ -245,7 +245,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-components-screener' -s 'apps/vr-tests-react-components/dist/storybook' --overwrite - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} - name: Start @fluentui/react-components VR Test run: yarn workspace @fluentui/vr-tests-react-components screener From 4b185c8a4ae7582fc1f408225c26b05202b4f951 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 14:20:42 +0300 Subject: [PATCH 20/53] Fix error in logic --- .github/workflows/screener-run.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index f34ea0cd3dd760..afcb9297f1ac75 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -37,8 +37,8 @@ jobs: return artifact.name == "northstar-artifact" })[0]; if(matchArtifact !== undefined) - return 'false' - return 'true' + return 'true' + return 'false' result-encoding: string - name: Set env variable for skipping screener From fa3397e6057382eb85d7df7f089ac89b165d4096 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 14:27:02 +0300 Subject: [PATCH 21/53] Fix error in logic for all screener jobs --- .github/workflows/screener-run.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index afcb9297f1ac75..45aae6d2fe19fe 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -120,8 +120,8 @@ jobs: return artifact.name == "screener-artifact" })[0]; if(matchArtifact !== undefined) - return 'false' - return 'true' + return 'true' + return 'false' result-encoding: string - name: Set env variable for skipping screener @@ -200,8 +200,8 @@ jobs: return artifact.name == "vnext-artifact" })[0]; if(matchArtifact !== undefined) - return 'false' - return 'true' + return 'true' + return 'false' result-encoding: string - name: Set env variable for skipping screener From 138ad994d3da7a5aad597d7f81449024fae4d617 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 15:27:58 +0300 Subject: [PATCH 22/53] Add changes suggested by review --- .github/workflows/screener-build.yml | 24 +++++++++---------- .github/workflows/screener-run.yml | 36 +++++++--------------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index e86baf0836eea4..f4360416d3326c 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -107,9 +107,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV else - echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if northstar packages were affected @@ -124,13 +124,13 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react: runs-on: 'ubuntu-latest' @@ -166,9 +166,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV else - echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v8 packages were affected @@ -181,13 +181,13 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react-components: runs-on: 'ubuntu-latest' @@ -223,9 +223,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "IS_ARTIFACT_PRESENT=false" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV else - echo "IS_ARTIFACT_PRESENT=true" >> $GITHUB_ENV + echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v9 packages were affected @@ -238,10 +238,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.IS_ARTIFACT_PRESENT == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 45aae6d2fe19fe..955fd464d952f8 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -36,13 +36,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" })[0]; - if(matchArtifact !== undefined) - return 'true' - return 'false' - result-encoding: string - - - name: Set env variable for skipping screener - run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -59,7 +53,7 @@ jobs: name: northstar-artifact # downloads artifact to where it would be 'built' path: packages/fluentui/docs/dist - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Define env variables run: | @@ -83,7 +77,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' -s 'packages/fluentui/docs/dist' --overwrite - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Start @fluentui/react-northstar VR Test run: yarn workspace @fluentui/docs vr:test @@ -119,13 +113,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" })[0]; - if(matchArtifact !== undefined) - return 'true' - return 'false' - result-encoding: string - - - name: Set env variable for skipping screener - run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -141,7 +129,7 @@ jobs: workflow_conclusion: success name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Define env variables run: | @@ -164,7 +152,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-screener' -s 'apps/vr-tests/dist/storybook' --overwrite - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Start @fluentui/react VR Test run: yarn workspace @fluentui/vr-tests screener @@ -199,13 +187,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" })[0]; - if(matchArtifact !== undefined) - return 'true' - return 'false' - result-encoding: string - - - name: Set env variable for skipping screener - run: echo "IS_ARTIFACT_PRESENT=${{steps.skip-screener.outputs.result}}" >> $GITHUB_ENV + github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -221,7 +203,7 @@ jobs: workflow_conclusion: success name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Define env variables run: | @@ -245,7 +227,7 @@ jobs: with: inlineScript: | az storage blob upload-batch -d '$web/${{env.DEPLOYBASEPATH}}/react-components-screener' -s 'apps/vr-tests-react-components/dist/storybook' --overwrite - if: ${{ env.IS_ARTIFACT_PRESENT == 'false' }} + if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }} - name: Start @fluentui/react-components VR Test run: yarn workspace @fluentui/vr-tests-react-components screener From d6cdde9a7cb7e9f5cb4e44ff89992ffc534a1503 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 15:34:42 +0300 Subject: [PATCH 23/53] Fix for env variable export --- .github/workflows/screener-run.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 955fd464d952f8..d31d7e3e0d91df 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -28,6 +28,7 @@ jobs: id: skip-screener with: script: | + const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, @@ -36,7 +37,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" })[0]; - github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); + core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -104,6 +105,7 @@ jobs: id: skip-screener with: script: | + const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, @@ -113,7 +115,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" })[0]; - github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); + core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 @@ -179,6 +181,7 @@ jobs: id: skip-screener with: script: | + const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, @@ -187,7 +190,7 @@ jobs: let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" })[0]; - github.core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); + core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString()); - name: Download environment variables artifact uses: dawidd6/action-download-artifact@v2 From 17ddbdaa273e4ceb7b53090560050088c2f2e661 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 15:45:35 +0300 Subject: [PATCH 24/53] Remove redundant import --- .github/workflows/screener-run.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index d31d7e3e0d91df..3328005053640a 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -28,7 +28,6 @@ jobs: id: skip-screener with: script: | - const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, @@ -105,7 +104,6 @@ jobs: id: skip-screener with: script: | - const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, @@ -181,7 +179,6 @@ jobs: id: skip-screener with: script: | - const core = require('@actions/core'); let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, From 526a82186cfaf7558cb350bb8856c63be058e106 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 16:00:31 +0300 Subject: [PATCH 25/53] Fix error logic --- .github/workflows/screener-build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index f4360416d3326c..1ffeef4fcda267 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -107,9 +107,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/docs --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - else echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if northstar packages were affected @@ -124,13 +124,13 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' @@ -166,9 +166,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - else echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v8 packages were affected @@ -181,13 +181,13 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react-components: runs-on: 'ubuntu-latest' @@ -223,9 +223,9 @@ jobs: packageAffected=$(yarn --silent check:affected-package --packages @fluentui/vr-tests-react-components --pr=${{startsWith(github.ref, 'refs/pull/')}}) if [[ $packageAffected == false ]]; then echo "Should skip screener" - echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV - else echo "SKIP_SCREENER_BUILD=true" >> $GITHUB_ENV + else + echo "SKIP_SCREENER_BUILD=false" >> $GITHUB_ENV echo "Should NOT skip screener" fi name: Check if v9 packages were affected @@ -238,10 +238,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} From d392fe64bd2b0fdd553ea7759904f9c4f554c648 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 16:03:20 +0300 Subject: [PATCH 26/53] Change run id for testing purposes --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 3328005053640a..08f4bb37112c77 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2913281075, + run_id: 2919212750, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -108,7 +108,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2913281075, + run_id: 2919212750, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -182,7 +182,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2913281075, + run_id: 2919212750, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From 72879814bc9578fb83c38950fda7c40d02ef6b9f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Wed, 24 Aug 2022 16:29:37 +0300 Subject: [PATCH 27/53] Change run id for testing purposes --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 08f4bb37112c77..a1e6769b6bc79e 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2919212750, + run_id: 2918208590, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -108,7 +108,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2919212750, + run_id: 2918208590, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -182,7 +182,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2919212750, + run_id: 2918208590, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From a508667eac2b0f45ddb5d6308fffba94a47a4052 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 10:27:32 +0300 Subject: [PATCH 28/53] Fix comment typo --- scripts/tasks/screener.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tasks/screener.ts b/scripts/tasks/screener.ts index fa6324986d19dc..033c26dea2d1f2 100644 --- a/scripts/tasks/screener.ts +++ b/scripts/tasks/screener.ts @@ -17,7 +17,7 @@ export async function screener() { try { console.log(`screener-runner: skip build ${JSON.stringify(environment.screener.isScreenerBuild)}`); if (environment.screener.isScreenerBuild === 'true') { - //Skipping "getScreenerStates()" if artifacts were not build + //Skipping "getScreenerStates()" if artifacts were not built console.log('Running screener test:'); const screenerStates = await getScreenerStates(screenerConfig); screenerConfig.states = screenerStates; From ff14de4ddefec3605544e592a6a96d312adce86c Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 11:48:01 +0300 Subject: [PATCH 29/53] Test for previous build --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index a1e6769b6bc79e..c8be5698ba9f20 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -31,7 +31,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2918208590, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "northstar-artifact" @@ -108,7 +108,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, //run_id: context.payload.workflow_run.id, - run_id: 2918208590, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "screener-artifact" @@ -182,7 +182,7 @@ jobs: let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, - run_id: 2918208590, + run_id: 2917202539, }); let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "vnext-artifact" From ade2b5a3284679a8a4b788544179ef44322db183 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 12:29:31 +0300 Subject: [PATCH 30/53] Do not upload test apps for testing --- .github/workflows/screener-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 1ffeef4fcda267..70070d29338473 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -130,7 +130,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react: runs-on: 'ubuntu-latest' @@ -187,7 +187,7 @@ jobs: with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react-components: runs-on: 'ubuntu-latest' From 406491452bd6806f448a1c136e0c5e3843d72927 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 12:39:28 +0300 Subject: [PATCH 31/53] Add log --- scripts/screener/screener.runner.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index def3e6336ac479..65c4e8f60a5bb3 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -95,4 +95,9 @@ export async function screenerRunner(screenerConfig: ScreenerRunnerConfig) { console.log('Screener test in progress.'); return; } + + if (screenerRun.conclusion === 'cancelled') { + console.log('Screener test cancelled.'); + return; + } } From 55266c034e1f454a36a9cf1903c0ca233cf00793 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 12:40:12 +0300 Subject: [PATCH 32/53] Restore upload condition --- .github/workflows/screener-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 70070d29338473..1ffeef4fcda267 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -130,7 +130,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' @@ -187,7 +187,7 @@ jobs: with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react-components: runs-on: 'ubuntu-latest' From f9b26ab6bdac9b373641d21126a70145b69cd667 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 14:04:31 +0300 Subject: [PATCH 33/53] Not upload N* test app --- .github/workflows/screener-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 1ffeef4fcda267..96959b89cfcc50 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -130,7 +130,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react: runs-on: 'ubuntu-latest' @@ -214,7 +214,6 @@ jobs: with: node-version: 14.18.1 cache: 'yarn' - - name: Install dependencies run: yarn install --frozen-lockfile From 761830de87d2ad3c70cc231ce47ef3fa948abdc0 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 14:24:11 +0300 Subject: [PATCH 34/53] Restore upload condition --- .github/workflows/screener-build.yml | 2 +- scripts/tasks/screener.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 96959b89cfcc50..cef3688d76c5fc 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -130,7 +130,7 @@ jobs: with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' diff --git a/scripts/tasks/screener.ts b/scripts/tasks/screener.ts index 033c26dea2d1f2..3ab1f106fc56f2 100644 --- a/scripts/tasks/screener.ts +++ b/scripts/tasks/screener.ts @@ -15,6 +15,7 @@ export async function screener() { console.log(JSON.stringify(screenerConfig, null, 2)); try { + console.log(`config: ${screenerConfig.projectRepo}`); console.log(`screener-runner: skip build ${JSON.stringify(environment.screener.isScreenerBuild)}`); if (environment.screener.isScreenerBuild === 'true') { //Skipping "getScreenerStates()" if artifacts were not built From a7d370e1bd2059b5f3d5ccca5f79bbe99fdad23d Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 15:20:30 +0300 Subject: [PATCH 35/53] Add debug log --- scripts/screener/screener.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/screener/screener.config.js b/scripts/screener/screener.config.js index 599016792c851b..5b9a2d66b36ad6 100644 --- a/scripts/screener/screener.config.js +++ b/scripts/screener/screener.config.js @@ -63,3 +63,4 @@ module.exports = { } : null), }; +console.log(`STATES: ${this.states}`); From 5b439a09d7394ee399c8a3a34510ccefd632656d Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 15:53:46 +0300 Subject: [PATCH 36/53] Add debug message --- scripts/gulp/tasks/screener.ts | 2 +- scripts/screener/screener.config.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/gulp/tasks/screener.ts b/scripts/gulp/tasks/screener.ts index cad16621b101c2..81754d89559fc5 100644 --- a/scripts/gulp/tasks/screener.ts +++ b/scripts/gulp/tasks/screener.ts @@ -37,7 +37,7 @@ task('screener:runner', cb => { }); const screenerConfig = require(screenerConfigPath); - + console.log(`STATES: ${screenerConfig.states}`); handlePromiseExit(screenerRunner(screenerConfig)); }); diff --git a/scripts/screener/screener.config.js b/scripts/screener/screener.config.js index 5b9a2d66b36ad6..599016792c851b 100644 --- a/scripts/screener/screener.config.js +++ b/scripts/screener/screener.config.js @@ -63,4 +63,3 @@ module.exports = { } : null), }; -console.log(`STATES: ${this.states}`); From 5134bd0cfe639384b06b149d6cc6a2d568649909 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Thu, 25 Aug 2022 16:48:28 +0300 Subject: [PATCH 37/53] Add debug message --- scripts/gulp/tasks/screener.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gulp/tasks/screener.ts b/scripts/gulp/tasks/screener.ts index 81754d89559fc5..f479b29a0fc681 100644 --- a/scripts/gulp/tasks/screener.ts +++ b/scripts/gulp/tasks/screener.ts @@ -37,7 +37,7 @@ task('screener:runner', cb => { }); const screenerConfig = require(screenerConfigPath); - console.log(`STATES: ${screenerConfig.states}`); + console.log(`STATES: ${JSON.stringify(screenerConfig.states[0])}`); handlePromiseExit(screenerRunner(screenerConfig)); }); From 96ee782ac537ad274e935cf49fc57f015a8c893e Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Fri, 26 Aug 2022 18:02:25 +0300 Subject: [PATCH 38/53] Fix bug --- .github/workflows/screener-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index cef3688d76c5fc..dab81fb11b9b91 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -65,7 +65,7 @@ jobs: DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{ github.ref_name }} BUILD_SOURCEBRANCHNAME=${{ github.ref_name }} EOT - if: ${{startsWith(github.ref, 'refs/pull/')}} + if: ${{!startsWith(github.ref, 'refs/pull/')}} - name: Upload environment variables artifact uses: actions/upload-artifact@v3 From 0c8451cfd810db50c52054c20c052417028bfaa3 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Fri, 26 Aug 2022 18:34:12 +0300 Subject: [PATCH 39/53] Fix deployUrl bug --- .github/workflows/screener-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index dab81fb11b9b91..9eae68778a8f8a 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -53,7 +53,7 @@ jobs: SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }} SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }} DEPLOYBASEPATH=pull/$PR_NUMBER - DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/${{ github.event.number }} + DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/${{github.event.pull_request.number}} BUILD_SOURCEBRANCHNAME='merge' EOT if: ${{startsWith(github.ref, 'refs/pull/')}} @@ -61,8 +61,8 @@ jobs: - name: Set env variables if there is not a PR run: | cat <> artifacts/environment - DEPLOYBASEPATH=heads/${{ github.ref_name }} - DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{ github.ref_name }} + DEPLOYBASEPATH=heads/${{github.ref_name}} + DEPLOYURL=https://${{env.DEPLOYHOST}}/heads/${{github.ref_name}} BUILD_SOURCEBRANCHNAME=${{ github.ref_name }} EOT if: ${{!startsWith(github.ref, 'refs/pull/')}} From 718227a905c3815e0b3134b37e47a5ceb3e31179 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Fri, 26 Aug 2022 18:56:54 +0300 Subject: [PATCH 40/53] Fix deployBasePath value error --- .github/workflows/screener-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 9eae68778a8f8a..2a4ff5b747cd2e 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -52,7 +52,7 @@ jobs: SYSTEM_PULLREQUEST_SOURCEBRANCH=${{ github.event.pull_request.head.ref }} SYSTEM_PULLREQUEST_PULLREQUESTID=${{ github.event.pull_request.id }} SYSTEM_PULLREQUEST_SOURCECOMMITID=${{ github.event.pull_request.head.sha }} - DEPLOYBASEPATH=pull/$PR_NUMBER + DEPLOYBASEPATH=pull/${{github.event.pull_request.number}} DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/${{github.event.pull_request.number}} BUILD_SOURCEBRANCHNAME='merge' EOT From fbcf70a0c3ae4a0de92aa64fa6bd44d0898f451b Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 10:39:06 +0300 Subject: [PATCH 41/53] Intentionally not upload artifacts for testing purposes --- .github/workflows/screener-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 2a4ff5b747cd2e..0a8371f54cbe8f 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -124,13 +124,13 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react: runs-on: 'ubuntu-latest' @@ -181,13 +181,13 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} screener-react-components: runs-on: 'ubuntu-latest' @@ -237,10 +237,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'false'}} + if: ${{env.SKIP_SCREENER_BUILD == 'true'}} From d274b53adab87eaac85ef32808b0c1d8a06f2bd1 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 11:37:56 +0300 Subject: [PATCH 42/53] Remove previous test app uploads if artifact was not uploaded --- .github/workflows/screener-build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 0a8371f54cbe8f..72a037e2872421 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -132,6 +132,13 @@ jobs: path: packages/fluentui/docs/dist if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + - name: Delete previous N* VR test site + uses: azure/CLI@v1 + with: + inlineScript: | + az storage blob upload-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + screener-react: runs-on: 'ubuntu-latest' name: Screener @fluentui/react @@ -189,6 +196,13 @@ jobs: path: apps/vr-tests/dist/storybook if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + - name: Delete previous @fluentui/react VR test site + uses: azure/CLI@v1 + with: + inlineScript: | + az storage blob upload-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-screener' + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} + screener-react-components: runs-on: 'ubuntu-latest' name: Screener @fluentui/react-components @@ -244,3 +258,10 @@ jobs: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + + - name: Delete previous @fluentui/react-components VR test site + uses: azure/CLI@v1 + with: + inlineScript: | + az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-components-screener' + if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} From 52dca0d8fe2eef717532ad2b3ffe302ebad091d8 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 11:47:50 +0300 Subject: [PATCH 43/53] Provide connection string for delete command --- .github/workflows/screener-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 72a037e2872421..1a90d94c6ef7bf 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -9,6 +9,7 @@ on: env: DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' + AZURE_STORAGE_CONNECTION_STRING: ${{secrets.AZURE_STORAGE_CONNECTION_STRING}} jobs: environment-upload: @@ -136,7 +137,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az storage blob upload-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' + az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} screener-react: @@ -200,7 +201,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az storage blob upload-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-screener' + az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-screener' if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} screener-react-components: From 65835b10e0d78d01457464df0d28b53644104ab8 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 12:04:30 +0300 Subject: [PATCH 44/53] Change delete command arguments for react screener --- .github/workflows/screener-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 1a90d94c6ef7bf..6500d025f1ec06 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -201,7 +201,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-screener' + az storage blob delete-batch -s '$web' --pattern '${{env.DEPLOYBASEPATH}}/react-screener/*' if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} screener-react-components: From 80b266274b15d03336aefbef332be0b223b8a9be Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 12:40:56 +0300 Subject: [PATCH 45/53] Send artifact info to proxy --- .github/workflows/screener-build.yml | 22 ---------------------- scripts/screener/screener.runner.ts | 1 + 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 6500d025f1ec06..0a8371f54cbe8f 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -9,7 +9,6 @@ on: env: DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net' - AZURE_STORAGE_CONNECTION_STRING: ${{secrets.AZURE_STORAGE_CONNECTION_STRING}} jobs: environment-upload: @@ -133,13 +132,6 @@ jobs: path: packages/fluentui/docs/dist if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - - name: Delete previous N* VR test site - uses: azure/CLI@v1 - with: - inlineScript: | - az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-northstar-screener' - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} - screener-react: runs-on: 'ubuntu-latest' name: Screener @fluentui/react @@ -197,13 +189,6 @@ jobs: path: apps/vr-tests/dist/storybook if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - - name: Delete previous @fluentui/react VR test site - uses: azure/CLI@v1 - with: - inlineScript: | - az storage blob delete-batch -s '$web' --pattern '${{env.DEPLOYBASEPATH}}/react-screener/*' - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} - screener-react-components: runs-on: 'ubuntu-latest' name: Screener @fluentui/react-components @@ -259,10 +244,3 @@ jobs: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook if: ${{env.SKIP_SCREENER_BUILD == 'true'}} - - - name: Delete previous @fluentui/react-components VR test site - uses: azure/CLI@v1 - with: - inlineScript: | - az storage blob delete-batch -s '$web/${{env.DEPLOYBASEPATH}}/react-components-screener' - if: ${{ env.SKIP_SCREENER_BUILD == 'false' }} diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index d246a304cd0ec4..0b96c015641ac6 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -53,6 +53,7 @@ async function scheduleScreenerBuild( }, body: JSON.stringify({ payload: payload, + isArtifactPresent: environment.screener.isArtifactPresent, }), }); From 5cb8d8ae0d13be1872ae710a64c76d9f054adb64 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 12:56:44 +0300 Subject: [PATCH 46/53] Add comment --- scripts/screener/screener.runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index 0b96c015641ac6..2a007adb5840ad 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -45,7 +45,7 @@ async function scheduleScreenerBuild( commit: buildInfo.commit, pullRequest: buildInfo.pullRequest, }; - + //calling proxy const response = await fetch(environment.screener.proxyUri.replace('ci', 'runner'), { method: 'post', headers: { From 479c8017c4b4f84ad8c282b58d16b0768044ca75 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 13:09:00 +0300 Subject: [PATCH 47/53] Add log --- scripts/screener/screener.runner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index 2a007adb5840ad..fcbff7fdb82347 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -46,6 +46,7 @@ async function scheduleScreenerBuild( pullRequest: buildInfo.pullRequest, }; //calling proxy + console.log('ARTIFACT PRESENT? ' + environment.screener.isArtifactPresent); const response = await fetch(environment.screener.proxyUri.replace('ci', 'runner'), { method: 'post', headers: { @@ -53,7 +54,7 @@ async function scheduleScreenerBuild( }, body: JSON.stringify({ payload: payload, - isArtifactPresent: environment.screener.isArtifactPresent, + isArtifactPresent: 'false', }), }); From 5094e11abfbcff913ef971764eeec76ecf8b2b89 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 13:21:38 +0300 Subject: [PATCH 48/53] Change checkout branch for testing --- .github/workflows/screener-run.yml | 3 +++ scripts/screener/screener.runner.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index 6f47b2a401770e..be444965db5c26 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -16,6 +16,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: github.event.workflow_run.head_branch - uses: actions/setup-node@v3 with: @@ -93,6 +94,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: github.event.workflow_run.head_branch - uses: actions/setup-node@v3 with: @@ -167,6 +169,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + ref: github.event.workflow_run.head_branch - uses: actions/setup-node@v3 with: diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index fcbff7fdb82347..117d097a3c3645 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -54,7 +54,7 @@ async function scheduleScreenerBuild( }, body: JSON.stringify({ payload: payload, - isArtifactPresent: 'false', + isArtifactPresent: environment.screener.isArtifactPresent, }), }); From b4eb4c11fb8384db38e573a9930b38b359ba5012 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 13:31:15 +0300 Subject: [PATCH 49/53] Fix typo --- .github/workflows/screener-run.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index be444965db5c26..d32e810dafbc63 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: github.event.workflow_run.head_branch + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -94,7 +94,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: github.event.workflow_run.head_branch + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -169,7 +169,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: github.event.workflow_run.head_branch + ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: From 5fc07b90023ec703181cccce9b2b4352cec23380 Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 15:47:18 +0300 Subject: [PATCH 50/53] Remove ref checkout option --- .github/workflows/screener-run.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/screener-run.yml b/.github/workflows/screener-run.yml index d32e810dafbc63..6f47b2a401770e 100644 --- a/.github/workflows/screener-run.yml +++ b/.github/workflows/screener-run.yml @@ -16,7 +16,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -94,7 +93,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: @@ -169,7 +167,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{github.event.workflow_run.head_branch}} - uses: actions/setup-node@v3 with: From eea78aab81258b79d42d5f50e08b9a8bd953804a Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 15:57:58 +0300 Subject: [PATCH 51/53] Restore artifact upload condition --- .github/workflows/screener-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/screener-build.yml b/.github/workflows/screener-build.yml index 0a8371f54cbe8f..2a4ff5b747cd2e 100644 --- a/.github/workflows/screener-build.yml +++ b/.github/workflows/screener-build.yml @@ -124,13 +124,13 @@ jobs: run: yarn workspace @fluentui/docs vr:build env: SCREENER_BUILD: 1 - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: northstar-artifact path: packages/fluentui/docs/dist - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react: runs-on: 'ubuntu-latest' @@ -181,13 +181,13 @@ jobs: - name: build vr-tests storybook run: yarn workspace @fluentui/vr-tests screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: screener-artifact path: apps/vr-tests/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} screener-react-components: runs-on: 'ubuntu-latest' @@ -237,10 +237,10 @@ jobs: - name: build vr-tests-react-components storybook run: yarn workspace @fluentui/vr-tests-react-components screener:build - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} - uses: actions/upload-artifact@v3 with: name: vnext-artifact path: apps/vr-tests-react-components/dist/storybook - if: ${{env.SKIP_SCREENER_BUILD == 'true'}} + if: ${{env.SKIP_SCREENER_BUILD == 'false'}} From ef63f47654357f08c1720e47c5e8710c8db464ce Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Mon, 29 Aug 2022 16:40:06 +0300 Subject: [PATCH 52/53] Remove comment --- scripts/screener/screener.runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/screener/screener.runner.ts b/scripts/screener/screener.runner.ts index a1cf51e749d017..d5b57a1c9515e7 100644 --- a/scripts/screener/screener.runner.ts +++ b/scripts/screener/screener.runner.ts @@ -68,7 +68,7 @@ async function scheduleScreenerBuild( if (response.status !== 201 && response.status !== 200) { throw new Error(`Call to proxy failed: ${response.status}`); } - //conclusion of the screener run + return response.json() as ScheduleScreenerBuildResponse; } From 5087bf6d1c6f4603fd1beac1768b1d3f2323476f Mon Sep 17 00:00:00 2001 From: Raluca Pelin Date: Tue, 30 Aug 2022 11:14:17 +0300 Subject: [PATCH 53/53] Remove unnecessary log --- scripts/gulp/tasks/screener.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gulp/tasks/screener.ts b/scripts/gulp/tasks/screener.ts index f479b29a0fc681..cad16621b101c2 100644 --- a/scripts/gulp/tasks/screener.ts +++ b/scripts/gulp/tasks/screener.ts @@ -37,7 +37,7 @@ task('screener:runner', cb => { }); const screenerConfig = require(screenerConfigPath); - console.log(`STATES: ${JSON.stringify(screenerConfig.states[0])}`); + handlePromiseExit(screenerRunner(screenerConfig)); });