Skip to content

Commit

Permalink
fix(workflow): paths-filter error on push event (opensearch-project#1017
Browse files Browse the repository at this point in the history
)

refactor to use Github action builtin path filter

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
  • Loading branch information
ruanyl authored Mar 28, 2024
1 parent 05c66fe commit 9f0d25d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,17 @@ name: Bundle Snapshot based E2E Cypress tests workflow for core Dashboards (Wind
on:
pull_request:
branches: [ '**' ]
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
push:
branches: [ '**' ]
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'

jobs:
changes:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.filter.outputs.tests }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tests:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
tests-with-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand All @@ -30,8 +21,6 @@ jobs:
#osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true

tests-without-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/cypress-workflow-bundle-snapshot-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,24 @@ name: Bundle Snapshot based E2E Cypress tests workflow for core Dashboards
on:
pull_request:
branches: [ '**' ]
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
push:
branches: [ '**' ]
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'

jobs:
changes:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.filter.outputs.tests }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tests:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
tests-with-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true --ml_commons_dashboards.enabled=true

tests-without-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand Down

0 comments on commit 9f0d25d

Please sign in to comment.