Skip to content

Commit

Permalink
Scope pull-request workflows to paths
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Dec 2, 2024
1 parent 4a5ce91 commit 2f9cfc5
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,19 @@ jobs:
with:
node-version: 20
cache: 'npm'
- name: Get changed files
id: changed-tests
uses: tj-actions/changed-files@v45
with:
files: |
packages/**/*.js
packages/**/*.scss
dist/app/components/**/*.html
- name: Install dependencies
if: steps.changed-tests.outputs.any_changed == 'true'
run: npm ci
- name: Run tests
if: steps.changed-tests.outputs.any_changed == 'true'
run: npm test

ui_tests:
Expand All @@ -60,9 +70,17 @@ jobs:
with:
node-version: 20
cache: 'npm'
- name: Get changed files
id: changed-ui_tests
uses: tj-actions/changed-files@v45
with:
files: |
packages/**
tests/**
app/**
- name: Install dependencies
if: steps.changed-ui_tests.outputs.any_changed == 'true'
run: npm ci
- name: Run tests
run: npm test
- name: Run backstop
if: steps.changed-ui_tests.outputs.any_changed == 'true'
run: npm run backstop:ci

0 comments on commit 2f9cfc5

Please sign in to comment.