Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for plotly testing #121

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
196d74c
add workflow for plotly testing
Anush2303 Jan 29, 2025
f566a12
update workflow
Anush2303 Jan 29, 2025
eb55543
update upload-artifact version
Anush2303 Jan 30, 2025
7137ccb
update yarn.lock
Anush2303 Jan 30, 2025
7d89025
revert yarn.lock changes
Anush2303 Jan 30, 2025
1f91bfb
update yarn.lock and package.json
Anush2303 Jan 30, 2025
22433c0
update node version
Anush2303 Jan 30, 2025
c614eb9
update upload artifacts version
Anush2303 Jan 30, 2025
434dc1d
update build command
Anush2303 Jan 30, 2025
57b0704
update build command
Anush2303 Jan 30, 2025
834dc73
add nx dependency
Anush2303 Jan 30, 2025
82544f6
update package.json
Anush2303 Jan 30, 2025
07088ea
revert changes
Anush2303 Jan 30, 2025
4d113c7
added nx dependency
Anush2303 Jan 30, 2025
b4810e7
update add nx command
Anush2303 Jan 30, 2025
1c63662
intall packages
Anush2303 Jan 31, 2025
558f401
update build command
Anush2303 Jan 31, 2025
3c675a9
update build command
Anush2303 Jan 31, 2025
49ecdd9
update build command
Anush2303 Jan 31, 2025
7a99335
update build command
Anush2303 Jan 31, 2025
d6c0129
update workflow
Anush2303 Jan 31, 2025
f7e081f
update workflows
Anush2303 Jan 31, 2025
171e964
nice workflow
Anush2303 Jan 31, 2025
be949e4
intall playwright command
Anush2303 Jan 31, 2025
6f8c9cb
amend
Anush2303 Jan 31, 2025
34b4b3b
make test app synchronous
Anush2303 Jan 31, 2025
190abca
amend
Anush2303 Jan 31, 2025
0d0d720
update workflow
Anush2303 Jan 31, 2025
a96771b
amend
Anush2303 Jan 31, 2025
3128e87
updated workflow
Anush2303 Jan 31, 2025
c020533
amend
Anush2303 Jan 31, 2025
c631e9a
zip playwright report
Anush2303 Feb 1, 2025
7278fcb
amend
Anush2303 Feb 1, 2025
86101a7
amend
Anush2303 Feb 1, 2025
554c3a0
amend
Anush2303 Feb 1, 2025
43d08f7
amend
Anush2303 Feb 1, 2025
e2690ec
amend
Anush2303 Feb 1, 2025
8defcd4
amend
Anush2303 Feb 1, 2025
cb6f040
amend
Anush2303 Feb 1, 2025
0e25b25
amend
Anush2303 Feb 1, 2025
4bfcee4
amend
Anush2303 Feb 1, 2025
b23b010
amend
Anush2303 Feb 2, 2025
c97ab28
amend
Anush2303 Feb 2, 2025
5b9fbe4
amend
Anush2303 Feb 3, 2025
ccc4be0
amend
Anush2303 Feb 3, 2025
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
99 changes: 99 additions & 0 deletions .github/workflows/plotlyTestCoverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "Plotly Test Coverage"
on:
pull_request:
types: [synchronize]
workflow_dispatch:
inputs:
repo:
description: "Repo to run the tests on"
required: true
default: "microsoft/fluentui"
branch:
description: "Branch to run the tests on"
required: true
default: "master"

permissions:
contents: write
pages: write
id-token: write

jobs:
run_tests:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
outputs:
test_coverage: ${{ steps.run_tests.outputs }}
windows_artifact_name: ${{ steps.windows.outputs.COVERAGE_FILENAME_WINDOWS }}

steps:
- name: Checkout [react-charting]
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repo || 'microsoft/fluentui'}}
ref: ${{ github.event.inputs.branch || 'master'}}
path: repo1

- name: Show current directory
run: echo "$PWD" && ls

- name: Show repo1 repository
run: ls ./repo1

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install packages
run: |
cd ./repo1
yarn install

- name: Build
run: |
cd ./repo1/packages/charts/react-charting
yarn nx run react-charting:build

- name: Run yarn pack to create .tgz file
run: |
cd ./repo1/packages/charts/react-charting
yarn pack --filename react-charting.tgz
id: pack

- name: Checkout [master] of current repo
uses: actions/checkout@v4
with:
path: main_repo

- name: Install .tgz file in Plotly examples
run: |
cd main_repo/apps/plotly_examples
yarn add ../../repo1/packages/charts/react-charting/react-charting.tgz
yarn install

- name: Start test app in background
run: |
cd main_repo/apps/plotly_examples
nohup npm start > output.log 2>&1 &
npx wait-on http://localhost:3000/ --timeout 300000

- name: Run Playwright test script
run: |
cd main_repo/apps/plotly_examples
npx playwright install
npx cross-env BASE_URL='http://localhost:3000/' npx playwright test || true

- name: Zip Playwright report
shell: pwsh
run: |
cd main_repo/apps/plotly_examples
Compress-Archive -Path playwright-report -DestinationPath playwright-report.zip

- name: Upload Playwright report as artifact
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: main_repo/apps/plotly_examples/playwright-report/
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"devDependencies": {
"@types/node": "^22.10.7",
"nx": "^20.4.0"
}
}
Loading
Loading