Skip to content

Commit

Permalink
(chore) Only trigger e2e tests when relevant code has changed (#888)
Browse files Browse the repository at this point in the history
* (chore) Only trigger e2e tests when relevant code has changed

* Fix the outputs

* Another fix-up

* Try again
  • Loading branch information
ibacher authored Jan 16, 2024
1 parent ece61c4 commit c07c4f8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,43 @@ on:
- main

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
test-changes: ${{ steps.changes.outputs.test-sources }}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Check if any source code has changed
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
test-sources:
- 'packages/**/src/**/*!(.test).ts'
- 'packages/**/src/**/*!(.test).tsx'
- 'packages/**/src/**/*!(.test).js'
- 'packages/**/src/**/*!(.test).jsx'
- 'packages/**/src/**/*.scss'
- 'packages/**/src/routes.json'
- 'playwright.config.ts'
- 'e2e/**/*.ts'
- 'e2e/**/*.js'
- 'e2e/support/github/**/*.*'
- 'example.env'
- '.github/workflows/e2e.yml'
main:
needs: changes
if: ${{ needs.changes.outputs.test-changes == 'true' }}

runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down

0 comments on commit c07c4f8

Please sign in to comment.