Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 56 additions & 13 deletions .github/workflows/screener-run.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
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
with:
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];
core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString());

- name: Download environment variables artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -42,6 +51,7 @@ jobs:
name: northstar-artifact
# downloads artifact to where it would be 'built'
path: packages/fluentui/docs/dist
if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }}

- name: Define env variables
run: |
Expand All @@ -50,6 +60,7 @@ jobs:
do
echo "$line" >> $GITHUB_ENV
done < "$input_file"

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -64,6 +75,8 @@ 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 == 'true' }}

- name: Start @fluentui/react-northstar VR Test
run: yarn workspace @fluentui/docs vr:test
env:
Expand All @@ -73,20 +86,32 @@ 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
with:
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];
core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString());

- name: Download environment variables artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -101,6 +126,7 @@ jobs:
workflow_conclusion: success
name: screener-artifact
path: apps/vr-tests/dist/storybook
if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }}

- name: Define env variables
run: |
Expand All @@ -109,6 +135,7 @@ jobs:
do
echo "$line" >> $GITHUB_ENV
done < "$input_file"

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -117,12 +144,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.IS_ARTIFACT_PRESENT == 'true' }}

- name: Start @fluentui/react VR Test
run: yarn workspace @fluentui/vr-tests screener
env:
Expand All @@ -132,20 +160,32 @@ 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
with:
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];
core.exportVariable('IS_ARTIFACT_PRESENT', (matchArtifact !== undefined).toString());

- name: Download environment variables artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -160,6 +200,7 @@ jobs:
workflow_conclusion: success
name: vnext-artifact
path: apps/vr-tests-react-components/dist/storybook
if: ${{ env.IS_ARTIFACT_PRESENT == 'true' }}

- name: Define env variables
run: |
Expand All @@ -183,6 +224,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.IS_ARTIFACT_PRESENT == 'true' }}

- name: Start @fluentui/react-components VR Test
run: yarn workspace @fluentui/vr-tests-react-components screener
env:
Expand Down