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 1ad6a24
Show file tree
Hide file tree
Showing 2 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 @@ -120,7 +119,7 @@ describe('GET /api/v1/contents/[username]/[slug]/thumbnail', () => {
expect(Buffer.compare(benchmarkFile, responseBody)).toEqual(0); // has the same bytes
});

test('"root" content with long "title", long "username" and 0 "children"', async () => {
test.only('"root" content with long "title", long "username" and 0 "children"', async () => {
const defaultUser = await orchestrator.createUser({
username: 'ThisUsernameHas30Characterssss',
});
Expand All @@ -145,6 +144,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

0 comments on commit 1ad6a24

Please sign in to comment.