Skip to content

Commit

Permalink
ci(temp): dEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
filipedeschamps committed Jul 21, 2022
1 parent 9de7d36 commit 882a76c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- run: npm ci
- run: npm run dev & npx jest --runInBand

- uses: actions/upload-artifact@v3
with:
name: thumbnail-artifact
path: thumbnail.png

- name: Stop containers
if: always()
run: docker-compose -f infra/docker-compose.development.yml down
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { join, resolve } = require('path');
import { readFileSync } from 'fs';
import { setTimeout } from 'timers/promises';
import { readFileSync, writeFileSync } from 'fs';
import fetch from 'cross-fetch';
import { version as uuidVersion } from 'uuid';
import orchestrator from 'tests/orchestrator.js';
Expand Down Expand Up @@ -83,7 +82,7 @@ describe('GET /api/v1/contents/[username]/[slug]/thumbnail', () => {
});

jest.useFakeTimers({
now: Date.parse('2022-01-01T00:00:00.000Z'),
now: Date.parse('2022-01-01T12:00:00.000Z'),
advanceTimers: true,
});

Expand All @@ -101,6 +100,8 @@ describe('GET /api/v1/contents/[username]/[slug]/thumbnail', () => {

const responseBody = await response.buffer();

writeFileSync(join(resolve('.'), 'thumbnail.png'), responseBody);

const benchmarkFile = readFileSync(
join(
resolve('.'),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 882a76c

Please sign in to comment.