Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add path filters to long tests
Dhruv Bhanushalia16529095547
diff --git a/.github/filters.yml b/.github/filters.ymlnew file mode 100644index 000000000..cb93c67a5--- /dev/null+++ b/.github/filters.yml@@ -0,0 +1,6 @@+api:+ - api/**+ingestion_server:+ - ingestion_server/**+frontend:+ - frontend/**diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex df8d250c9..96d9b8f83 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -28,6 +28,26 @@ jobs:# Helpers ############+ get-changes:+ name: Get changes+ runs-on: ubuntu-latest+ permissions:+ pull-requests: read+ outputs:+ api: ${{ steps.paths-filter.outputs.api }}+ ingestion_server: ${{ steps.paths-filter.outputs.ingestion_server }}+ frontend: ${{ steps.paths-filter.outputs.frontend }}++ steps:+ - name: Checkout repository+ uses: actions/checkout@v3++ - id: paths-filter+ name: Check changed paths+ uses: dorny/paths-filter@v2+ with:+ filters: ./.github/filters.yml+get-image-tag:name: Get image tagruns-on: ubuntu-latest@@ -133,15 +153,23 @@ jobs:test-ing:name: Run tests for ingestion-server+ if: needs.get-changes.outputs.ingestion_server == 'true'runs-on: ubuntu-latesttimeout-minutes: 15needs:+ - get-changes- build-imagessteps:- name: Checkout repositoryuses: actions/checkout@v3+ - id: paths-filter+ name: Conditionally skip job+ uses: dorny/paths-filter@v2+ with:+ filters: .github/filters.yml+- name: Setup CI envuses: ./.github/actions/setup-envwith:@@ -176,9 +204,11 @@ jobs:test-api:name: Run tests for the API+ if: needs.get-changes.outputs.ingestion_server == 'true' || needs.get-changes.outputs.api == 'true'runs-on: ubuntu-latesttimeout-minutes: 15needs:+ - get-changes- build-imagessteps:@@ -455,8 +485,10 @@ jobs:nuxt-playwright-e2e:name: Nuxt Playwright e2e tests+ if: needs.get-changes.outputs.frontend == 'true'runs-on: ubuntu-latestneeds:+ - get-changes- lintsteps:@@ -481,8 +513,10 @@ jobs:nuxt-playwright-vr:name: Nuxt Playwright VR tests+ if: needs.get-changes.outputs.frontend == 'true'runs-on: ubuntu-latestneeds:+ - get-changes- lintsteps:@@ -507,8 +541,10 @@ jobs:storybook-playwright:name: Storybook Playwright tests+ if: needs.get-changes.outputs.frontend == 'true'runs-on: ubuntu-latestneeds:+ - get-changes- lintsteps:@@ -534,8 +570,10 @@ jobs:clean-playwright-failure-comment:name: Remove Playwright test debugging instructions+ if: github.event_name == 'pull_request' && needs.get-changes.outputs.frontend == 'true'runs-on: ubuntu-latest- if: github.event_name == 'pull_request'+ needs:+ - get-changessteps:- uses: peter-evans/find-comment@v2@@ -557,9 +595,10 @@ jobs:playwright-test-failure-comment:name: Post Playwright test debugging instructions+ if: always() && needs.get-changes.outputs.frontend == 'true' && github.event_name == 'pull_request' && (needs.nuxt-playwright-vr.result == 'failure' || needs.nuxt-playwright-e2e.result == 'failure' ||needs.storybook-playwright.result == 'failure')runs-on: ubuntu-latest- if: always() && github.event_name == 'pull_request' && (needs.nuxt-playwright-vr.result == 'failure' || needs.nuxt-playwright-e2e.result == 'failure' ||needs.storybook-playwright.result == 'failure')needs:+ - get-changes- nuxt-playwright-e2e- nuxt-playwright-vr- storybook-playwright