Skip to content

Commit

Permalink
Add CI test to verify build output is in sync with source (.js vs .mjs)
Browse files Browse the repository at this point in the history
With the introduction of a build step, where we take the source in .mjs
and build it into .js for non-ES Module systems, it's very important
that we remember to keep those two in sync.

That's what the CI job created in these changes ensure;

1. Run the build script
2. See if there are any pending git changes as a result

As long as there are no pending git changes, we're all fine and dandy,
or else we need to run the `npm run build` and commit the changes.
  • Loading branch information
phillipj committed Dec 18, 2019
1 parent b72d1a3 commit ddad1a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,18 @@ jobs:
deno-version: 'v0.23.0'
- run: deno --version
- run: deno test --allow-net=deno.land test/module-systems/deno-test.ts

build-output-sync:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install, build and check git diff
run: |
npm ci
npm run build
git diff --quiet HEAD --

0 comments on commit ddad1a7

Please # to comment.