Skip to content

Commit dcc4294

Browse files
committed
Run new integration tests in ci
add integration-test in ci rename lib to test-helper
1 parent 38c04ca commit dcc4294

5 files changed

Lines changed: 24 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,26 @@ jobs:
4747
- name: Run fastboot-app-server Tests
4848
run: yarn workspace fastboot-app-server test:mocha
4949

50+
integration-tests:
51+
name: Integration Tests
52+
runs-on: ${{ matrix.os }}
53+
54+
strategy:
55+
matrix:
56+
node-version: [14.x, 12.x, 10.x]
57+
os: [ubuntu-latest, windows-latest]
58+
59+
steps:
60+
- name: Checkout Code
61+
uses: actions/checkout@v2
62+
- name: Use Node.js ${{ matrix.node-version }}
63+
uses: actions/setup-node@v1
64+
with:
65+
node-version: ${{ matrix.node-version }}
66+
- name: Yarn Install
67+
run: yarn install --ignore-engines --frozen-lockfile
68+
- name: Integration Tests
69+
run: yarn workspace integration-tests test
5070

5171
test-packages:
5272
name: Test Packages
File renamed without changes.

test-packages/integration-tests/lib/clean-dists.js renamed to test-packages/integration-tests/helpers/clean-dists.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ const path = require("path");
33
const apps = ["basic-app", "hot-swap-app", "custom-sandbox-app"].map((p) =>
44
path.join(__dirname, "..", "..", p, "dist")
55
);
6-
apps.forEach((dist) => fs.rmdirSync(dist, { recursive: true }));
6+
apps.forEach((dist) => fs.existsSync(dist) && fs.rmdirSync(dist, { recursive: true }));

test-packages/integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "3.1.2",
55
"repository": "",
66
"scripts": {
7-
"test": "node lib/clean-dists.js && mocha"
7+
"test": "node helpers/clean-dists.js && mocha"
88
},
99
"devDependencies": {
1010
"ember-cli-fastboot": "3.1.2",

test-packages/integration-tests/test/basic-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const expect = require("chai").expect;
44
const fs = require("fs");
55
const path = require("path");
66
const FastBoot = require("fastboot");
7-
const buildDist = require("../lib/build-dist");
7+
const buildDist = require("../helpers/build-dist");
88

99
function dummyRequest() {
1010
return {
@@ -22,7 +22,7 @@ function dummyResponse() {
2222
}
2323

2424
describe("FastBoot", function() {
25-
this.timeout(100_000);
25+
this.timeout(100000);
2626
it("can render HTML", async function() {
2727
const distPath = await buildDist("basic-app");
2828
const fastboot = new FastBoot({

0 commit comments

Comments
 (0)