Skip to content

Commit

Permalink
Merge pull request #1910 from nestjs/next
Browse files Browse the repository at this point in the history
WIP: v9.0.0 support
  • Loading branch information
BrunnerLivio authored Jul 10, 2022
2 parents 64d9ccd + 2809388 commit d00d4f3
Show file tree
Hide file tree
Showing 7 changed files with 485 additions and 273 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests
name: Build Samples

on: [push, pull_request]

Expand All @@ -7,13 +7,17 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js 12
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 12
- run: npm install
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build:all
env:
CI: true
8 changes: 6 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js 14
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 14
node-version: ${{ matrix.node-version }}
- run: docker-compose up -d
- run: npm ci
- run: npm run test:e2e
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm ci
- run: npm run build
- run: npm test
env:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14.2
12.22.12
40 changes: 21 additions & 19 deletions e2e/health-checks/typeorm.health.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,29 @@ describe('TypeOrmHealthIndicator', () => {
});
});

it('should throw an error if runs into timeout error', async () => {
app = await setHealthEndpoint(({ healthCheck, typeorm }) =>
healthCheck.check([
async () => typeorm.pingCheck('typeorm', { timeout: 1 }),
]),
).start();
// FIXME: Find a better way to test timeout errors
// This test has been disabled because it is flaky
// it('should throw an error if runs into timeout error', async () => {
// app = await setHealthEndpoint(({ healthCheck, typeorm }) =>
// healthCheck.check([
// async () => typeorm.pingCheck('typeorm', { timeout: 1 }),
// ]),
// ).start();

const details = {
typeorm: {
status: 'down',
message: 'timeout of 1ms exceeded',
},
};
// const details = {
// typeorm: {
// status: 'down',
// message: 'timeout of 1ms exceeded',
// },
// };

return request(app.getHttpServer()).get('/health').expect(503).expect({
status: 'error',
info: {},
error: details,
details,
});
});
// return request(app.getHttpServer()).get('/health').expect(503).expect({
// status: 'error',
// info: {},
// error: details,
// details,
// });
// });
});

afterEach(async () => await app.close());
Expand Down
Loading

0 comments on commit d00d4f3

Please sign in to comment.