github/workflows: run all tests on changes to yarn.lock

This commit is contained in:
Patrik Oldsberg
2020-05-13 14:28:30 +02:00
parent f577f50fdc
commit 1579a9dded
+11 -1
View File
@@ -48,6 +48,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: check for yarn.lock changes
id: yarn-lock
run: git diff --quiet origin/master HEAD -- yarn.lock
continue-on-error: true
- name: yarn install
run: yarn install --frozen-lockfile
@@ -57,9 +62,14 @@ jobs:
- name: build
run: yarn build
- name: test
- name: test changed packages
if: ${{ steps.yarn-lock.outcome == 'success' }}
run: yarn lerna -- run test --since origin/master -- --coverage
- name: test all packages
if: ${{ steps.yarn-lock.outcome == 'failure' }}
run: yarn lerna -- run test -- --coverage
- name: yarn bundle, if app was changed
run: git diff --quiet origin/master HEAD -- yarn.lock packages/app packages/core || yarn bundle