-
Notifications
You must be signed in to change notification settings - Fork 107
52 lines (49 loc) · 1.28 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Pull request
on: pull_request
jobs:
tests:
name: Javascript unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
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:
name: Visual regression tests2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
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 backstop
if: steps.changed-ui_tests.outputs.any_changed == 'true'
run: npm run backstop:ci