From ddad1a71120d8bb48a181546d94a70cbb942ab04 Mon Sep 17 00:00:00 2001 From: Phillip Johnsen Date: Fri, 22 Nov 2019 22:36:44 +0100 Subject: [PATCH] Add CI test to verify build output is in sync with source (.js vs .mjs) 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. --- .github/workflows/verify.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 42e80d9d4..b3cda17ff 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -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 --