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

[WIP]: Github workflow for plotly testing #120

Closed
Closed
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
80 changes: 80 additions & 0 deletions .github/workflows/plotlytestCoverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: "Plotly Test coverage"
on:
schedule:
- cron: "0 */8 * * *"
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"

#Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
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 [master]
uses: actions/checkout@v4

- 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 respository
run: ls ./repo1

- name: Install packgaes
run: yarn --cwd ./repo1 && yarn --cwd ./repo1/packages/charts/react-charting

- name: Build
run: yarn --cwd ./repo1 buildto @fluentui/react-charting

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

- name: Install .tgz file in Plotly examples
run: |
cd apps/plotly_examples
rm -rf node_modules
yarn install
yarn add ../rep1/packages/charts/react-charting/react-charting.tgz
yarn install

- name: Locally run the test app
run: |
cd apps/plotly_examples
npm start

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



Loading