diff --git a/.github/workflows/cypress-e2e-gantt-chart-test.yml b/.github/workflows/cypress-e2e-gantt-chart-test.yml index fb3e514..304618a 100644 --- a/.github/workflows/cypress-e2e-gantt-chart-test.yml +++ b/.github/workflows/cypress-e2e-gantt-chart-test.yml @@ -134,9 +134,33 @@ jobs: done working-directory: OpenSearch-Dashboards - - name: DEBUGGING PWD - run : | - pwd - ls - cd ./OpenSearch-Dashboards/plugins - ls + - name: Install Cypress + run: | + cd ./OpenSearch-Dashboards/plugins/gantt-chart + npx cypress install + shell: bash + + - name: Get Cypress version + id: cypress_version + run: | + cd ./OpenSearch-Dashboards/plugins/gantt-chart + echo "::set-output name=cypress_version::$(cat ./package.json | jq '.dependencies.cypress' | tr -d '"')" + + - name: Run Cypress tests + run: | + cd ./OpenSearch-Dashboards/plugins/gantt-chart + yarn cypress:run --browser chrome --headless --spec '.cypress/integration/${{ matrix.testgroups }}/*' + + - name: Capture failure screenshots + uses: actions/upload-artifact@v1 + if: failure() + with: + name: cypress-screenshots-${{ matrix.os }} + path: OpenSearch-Dashboards/plugins/gantt-chart/.cypress/screenshots + + - name: Capture test video + uses: actions/upload-artifact@v1 + if: always() + with: + name: cypress-videos-${{ matrix.os }} + path: OpenSearch-Dashboards/plugins/gantt-chart/.cypress/videos