From 623184c55db44a7ff8f00e58154b558fdcf7af23 Mon Sep 17 00:00:00 2001 From: Jack Boswell Date: Mon, 20 Jun 2022 21:17:01 +1200 Subject: [PATCH] Validate library is up to date in workflow (#121) --- .github/workflows/pr-validation.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 9f707c94..2f90634b 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -18,13 +18,25 @@ jobs: steps: - uses: actions/checkout@v3 - # Runs a single command using the runners shell + # Set up NPM and deps - name: Set up NPM run: npm ci - # Runs a set of commands using the runners shell + # Do a build - name: Run Build run: npm run build + # Check whether the compiled library changed + - name: Check Build Updated + uses: tj-actions/verify-changed-files@v9.2 + id: verify-built-lib + with: + files: lib/index.js + + # If it did change, the authro forgot to build. Fail the action + - name: Verify Build Updated + if: steps.verify-changed-files.outputs.files_changed == 'true' + run: exit 1 + - name: Run Tests run: npm test