Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6b158e9
Add scoping for workflow
Aug 23, 2022
b6636d5
Fix typo from step condition
Aug 23, 2022
e606ec0
Change order of job steps
Aug 23, 2022
6251119
Checkout PR source branch
Aug 23, 2022
1578d8a
Change trigger event
Aug 23, 2022
a392b53
Use previous run as mock trigger for testing purposes
Aug 23, 2022
1eb168a
Update proxy endpoint
Aug 23, 2022
fc50023
Use previous run as mock trigger for testing purposes
Aug 23, 2022
6159b6c
Fix logic error
Aug 23, 2022
5a5ad66
Not uploading storybook for testing purposes
Aug 23, 2022
535422e
Restore condition for build artifact upload
Aug 23, 2022
e25116f
do not upload N* build for testing purposes
Aug 24, 2022
750d8c1
Test case of skipping N* build
Aug 24, 2022
2fd5766
Add part of the changes suggested in review
Aug 24, 2022
2e5417d
Fix env variable typo
Aug 24, 2022
53aec46
Remove unnecessary env variable
Aug 24, 2022
caa1d94
Change logic regarding env variable usage
Aug 24, 2022
4a0309c
Test skipping screener for vnext
Aug 24, 2022
7284061
Update env variable name
Aug 24, 2022
4b185c8
Fix error in logic
Aug 24, 2022
fa3397e
Fix error in logic for all screener jobs
Aug 24, 2022
138ad99
Add changes suggested by review
Aug 24, 2022
d6cdde9
Fix for env variable export
Aug 24, 2022
17ddbda
Remove redundant import
Aug 24, 2022
526a821
Fix error logic
Aug 24, 2022
d392fe6
Change run id for testing purposes
Aug 24, 2022
7287981
Change run id for testing purposes
Aug 24, 2022
a508667
Fix comment typo
Aug 25, 2022
ff14de4
Test for previous build
Aug 25, 2022
ade2b5a
Do not upload test apps for testing
Aug 25, 2022
4064914
Add log
Aug 25, 2022
55266c0
Restore upload condition
Aug 25, 2022
f9b26ab
Not upload N* test app
Aug 25, 2022
761830d
Restore upload condition
Aug 25, 2022
a7d370e
Add debug log
Aug 25, 2022
5b439a0
Add debug message
Aug 25, 2022
5134bd0
Add debug message
Aug 25, 2022
e25675a
Solve conflicts with master
Aug 26, 2022
96ee782
Fix bug
Aug 26, 2022
0c8451c
Fix deployUrl bug
Aug 26, 2022
718227a
Fix deployBasePath value error
Aug 26, 2022
fbcf70a
Intentionally not upload artifacts for testing purposes
Aug 29, 2022
d274b53
Remove previous test app uploads if artifact was not uploaded
Aug 29, 2022
52dca0d
Provide connection string for delete command
Aug 29, 2022
65835b1
Change delete command arguments for react screener
Aug 29, 2022
80b2662
Send artifact info to proxy
Aug 29, 2022
5cb8d8a
Add comment
Aug 29, 2022
479c801
Add log
Aug 29, 2022
5094e11
Change checkout branch for testing
Aug 29, 2022
b4eb4c1
Fix typo
Aug 29, 2022
214eb80
Solve conflict
Aug 29, 2022
5fc07b9
Remove ref checkout option
Aug 29, 2022
eea78aa
Restore artifact upload condition
Aug 29, 2022
ef63f47
Remove comment
Aug 29, 2022
5087bf6
Remove unnecessary log
Aug 30, 2022
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
140 changes: 107 additions & 33 deletions .github/workflows/screener-build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Screener build

on: workflow_dispatch
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

env:
DEPLOYHOST: 'fluentuipr.z22.web.core.windows.net'

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
Expand All @@ -28,14 +34,13 @@ 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
# 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/<pr_number> for PRs
# DEPLOYURL= address for tests deployment, uses DEPLOYHOST and DEPLOYBASEPATH
# BUILD_SOURCEBRANCHNAME = 'merge' for PRs
Expand All @@ -47,22 +52,17 @@ 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://$DEPLOYHOST/pull/$PR_NUMBER
DEPLOYBASEPATH=pull/${{github.event.pull_request.number}}
DEPLOYURL=https://${{env.DEPLOYHOST}}/pull/${{github.event.pull_request.number}}
BUILD_SOURCEBRANCHNAME='merge'
EOT
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: |
cat <<EOT >> 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/')}}
Expand All @@ -75,19 +75,24 @@ jobs:

screener-react-northstar:
runs-on: 'ubuntu-latest'

name: Screener @fluentui/react-northstar

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
- name: Download env variables artifact
uses: actions/download-artifact@v3
with:
name: env-artifact

- name: Define env variables
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\
input_file="environment"
while read line
do
echo "$line" >> $GITHUB_ENV
done < "$input_file"

- uses: actions/setup-node@v3
with:
Expand All @@ -97,31 +102,56 @@ jobs:
- name: Install dependencies
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/')}})
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

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\

- name: build FUI N* VR Test
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: Log environment variables (Linux)
if: runner.os == 'Linux'
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: env-artifact

- name: Define env variables
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\
input_file="environment"
while read line
do
echo "$line" >> $GITHUB_ENV
done < "$input_file"

- uses: actions/setup-node@v3
with:
Expand All @@ -131,42 +161,86 @@ jobs:
- name: Install dependencies
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 --pr=${{startsWith(github.ref, 'refs/pull/')}})
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

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\

- 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: Log environment variables (Linux)
if: runner.os == 'Linux'
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: env-artifact

- name: Define env variables
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\
input_file="environment"
while read line
do
echo "$line" >> $GITHUB_ENV
done < "$input_file"

- uses: actions/setup-node@v3
with:
node-version: 14.18.1
cache: 'yarn'

- name: Install dependencies
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/')}})
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

- name: Log environment variables (Linux)
if: runner.os == 'Linux'
run: |
printenv | sort ;\
echo "SHELLOPTS $SHELLOPTS" ;\

- 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'}}
2 changes: 2 additions & 0 deletions .github/workflows/screener-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- Screener build
types:
- completed

env:
AZURE_STORAGE_CONNECTION_STRING: ${{secrets.AZURE_STORAGE_CONNECTION_STRING}}
jobs:
Expand All @@ -30,6 +31,7 @@ jobs:
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"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ The following table will help you navigate the 3 projects and understand their d

[Fluent UI Insights](https://docs.microsoft.com/en-us/shows/fluent-ui-insights?utm_source=github) is a series that describes the design and decisions behind the Fluent UI design system.

| EP01: Positioning | EP02: Styling |
| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---: |
| EP01: Positioning | EP02: Styling |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://docs.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-positioning?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep01-preview.gif" alt="Watch EP01: Positioning" width="240" /></a> | <a href="https://docs.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-styling?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep02-preview.gif" alt="Watch EP02: Styling" width="240" /></a> |

## Licenses
Expand Down
Loading