Skip to content

Update dependency jspdf to v3.0.2 #1443

Update dependency jspdf to v3.0.2

Update dependency jspdf to v3.0.2 #1443

name: Test and Build OpenSearch Dashboards Reports
on: [pull_request, push]
env:
PLUGIN_NAME: reportsDashboards
ARTIFACT_NAME: reports-dashboards
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_PLUGIN_VERSION: '3.0.0.0-beta1'
jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch-dashboards
linux-build:
needs: Get-CI-Image-Tag
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root
steps:
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v4
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards
- name: Checkout Plugin
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
- name: OpenSearch Dashboards Plugin Bootstrap and test
uses: nick-fields/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: |
chown -R 1000:1000 `pwd`
cd ./OpenSearch-Dashboards/
su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v &&
cd ./plugins/${{ env.PLUGIN_NAME }} &&
whoami && yarn osd bootstrap --single-version=loose && yarn test --coverage"
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
flags: dashboards-report
directory: ./OpenSearch-Dashboards/plugins/
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build Artifact
run: |
chown -R 1000:1000 `pwd`
cd ./OpenSearch-Dashboards/
su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v &&
cd ./plugins/${{ env.PLUGIN_NAME }} &&
whoami && yarn build && mv -v ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip"
- name: Upload Artifact For Linux
uses: actions/[email protected]
with:
name: dashboards-reports-linux
path: ./OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
windows-mac-builds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Enable longer filenames (Windows only)
if: runner.os == 'Windows'
run: git config --system core.longpaths true
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v4
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: 'OpenSearch-Dashboards/.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn
shell: bash
run: |
YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn")
echo "Installing yarn@$YARN_VERSION"
npm i -g yarn@$YARN_VERSION
- run: node -v
- run: yarn -v
- name: Checkout Plugin
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
- name: OpenSearch Dashboards Plugin Bootstrap
uses: nick-fields/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenSearch-Dashboards && yarn osd bootstrap --single-version=loose
- name: Test
uses: nick-fields/retry@v1
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn test
- name: Build Artifact
run: |
cd ./OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn build
mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-${{ runner.os }}.zip
- name: Upload Artifact
uses: actions/[email protected]
with:
name: dashboards-reports-${{ runner.os }}
path: ./OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-${{ runner.os }}.zip