From 504eebcfbb666a120a74a134a1c5acbc430e8eb6 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Tue, 3 Mar 2020 13:22:05 -0500 Subject: [PATCH 1/4] Build integration tests during CI (and release) Note that this won't actually run them. Additionally, the *unit* tests are also built, impying that we're building them twice (once during this step, and possibly again when running the unit tests.) --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 1 + package.json | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 950891f0f1..0005851e93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,4 @@ jobs: npm ci npm run build npm test + npm run build:tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 200bb12fcd..1100ddb45e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,7 @@ jobs: run: | npm ci npm run build + npm run build:tests - name: Run unit tests run: npm test diff --git a/package.json b/package.json index fd3eca8c42..c20a7f6de1 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "scripts": { "build": "gulp build", + "build:tests": "gulp compile_test", "prepare": "npm run build", "lint": "run-p lint:src lint:test", "test": "run-s lint test:unit", From 265c2dcd8184141abeaf212e811600ae42a714df Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Tue, 3 Mar 2020 13:27:43 -0500 Subject: [PATCH 2/4] Purposely introduce an integration test compilation error (that passes lint!) --- test/integration/auth.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/auth.spec.ts b/test/integration/auth.spec.ts index 3bd65422cd..b975aaa147 100755 --- a/test/integration/auth.spec.ts +++ b/test/integration/auth.spec.ts @@ -31,6 +31,9 @@ import * as mocks from '../resources/mocks'; import { AuthProviderConfig } from '../../src/auth/auth-config'; import { deepExtend, deepCopy } from '../../src/utils/deep-copy'; import { User, FirebaseAuth } from '@firebase/auth-types'; +import * as zzz from '../this/doesnt/exist'; + +export const ThisIsACompilationError = zzz.Anything; const chalk = require('chalk'); // eslint-disable-line @typescript-eslint/no-var-requires From 5732ffe3549da5b3f6790f718f2f91a35789ee95 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Tue, 3 Mar 2020 13:33:49 -0500 Subject: [PATCH 3/4] Revert the integration test compilation error --- test/integration/auth.spec.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/integration/auth.spec.ts b/test/integration/auth.spec.ts index b975aaa147..3bd65422cd 100755 --- a/test/integration/auth.spec.ts +++ b/test/integration/auth.spec.ts @@ -31,9 +31,6 @@ import * as mocks from '../resources/mocks'; import { AuthProviderConfig } from '../../src/auth/auth-config'; import { deepExtend, deepCopy } from '../../src/utils/deep-copy'; import { User, FirebaseAuth } from '@firebase/auth-types'; -import * as zzz from '../this/doesnt/exist'; - -export const ThisIsACompilationError = zzz.Anything; const chalk = require('chalk'); // eslint-disable-line @typescript-eslint/no-var-requires From 7a7f21eaad889591c2db885a4a9ab386247e1d72 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Tue, 3 Mar 2020 13:46:28 -0500 Subject: [PATCH 4/4] Compile integration tests before running unit tests. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0005851e93..aa9b669139 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,5 @@ jobs: run: | npm ci npm run build - npm test npm run build:tests + npm test