Merge pull request #846 from spotify/rugvip/testem

github/workflows: run all tests on yarn.lock changes
This commit is contained in:
Patrik Oldsberg
2020-05-13 14:55:26 +02:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -7,6 +7,7 @@ on:
- 'packages/cli/**'
- 'packages/core/**'
- 'scripts/**'
- 'yarn.lock'
jobs:
build:
+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