Browse Source

Add CI check for outdated yarn.lock

Gabriel Horner 3 years ago
parent
commit
c70bc56d75
1 changed files with 6 additions and 1 deletions
  1. 6 1
      .github/workflows/build.yml

+ 6 - 1
.github/workflows/build.yml

@@ -2,7 +2,7 @@ name: CI
 
 on:
   push:
-    branches: [master]
+    # branches: [master]
     paths-ignore:
       - '*.md'
   pull_request:
@@ -66,9 +66,14 @@ jobs:
         if: steps.clojure-deps.outputs.cache-hit != 'true'
         run: clojure -A:cljs -P
 
+      - run: git diff --exit-code
       - name: Fetch yarn deps
         run: yarn install
 
+      # Exits with 0 if yarn.lock is up to date or 1 if we forgot to update it
+      - name: Ensure lockfile is up to date
+        run: git diff --exit-code yarn.lock
+
       - name: Run ClojureScript test
         run: |
           yarn cljs:test