Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Deno v2.0.0
- name: Setup Deno v2.1.4
uses: denoland/setup-deno@v1
with:
deno-version: v2.0.0
deno-version: v2.1.4

- name: Setup LCOV
run: sudo apt install -y lcov
Expand All @@ -35,11 +35,8 @@ jobs:
- name: Run tests and coverage
run: deno task cover

- name: Fix LCOV output for SonarCloud
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/report.lcov

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
uses: sonarsource/sonarqube-scan-action@v4.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/re-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}

- name: Setup Deno v2.0.0
- name: Setup Deno v2.1.4
uses: denoland/setup-deno@v1
with:
deno-version: v2.0.0
deno-version: v2.1.4

- name: Verify formatting
run: deno task fmt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Deno v2.0.0
- name: Setup Deno v2.1.4
uses: denoland/setup-deno@v1
with:
deno-version: v2.0.0
deno-version: v2.1.4

- name: Verify formatting
run: deno task fmt
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM denoland/deno:alpine-2.0.0
FROM denoland/deno:alpine-2.1.4

ENV APP_HOME=/home/app
WORKDIR $APP_HOME
Expand Down
23 changes: 23 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { Application, Context, Router } from 'jsr:@oak/oak@17.1.0';
export type { Middleware, Next } from 'jsr:@oak/oak@17.1.0';
export { load } from 'jsr:@std/dotenv@0.225.2';
export { bold, cyan, green } from 'jsr:@std/fmt@1.0.2/colors';
export { Application, Context, Router } from 'jsr:@oak/oak@17.1.3';
export type { Middleware, Next } from 'jsr:@oak/oak@17.1.3';
export { load } from 'jsr:@std/dotenv@0.225.3';
export { bold, cyan, green } from 'jsr:@std/fmt@1.0.3/colors';
export { type Output, Skimming } from 'jsr:@trackerforce/skimming@1.2.1';
export { ValidatorFn, ValidatorMiddleware } from 'jsr:@trackerforce/validator4oak@1.1.0';
4 changes: 2 additions & 2 deletions test/deps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { type Middleware, testing } from 'jsr:@oak/oak@17.1.0';
export { assert, assertEquals, assertFalse, assertObjectMatch } from 'jsr:@std/assert@1.0.5';
export { type Middleware, testing } from 'jsr:@oak/oak@17.1.3';
export { assert, assertEquals, assertFalse, assertObjectMatch } from 'jsr:@std/assert@1.0.9';
export { type IResponse, superoak } from 'https://deno.land/x/superoak@4.8.1/mod.ts';

// Fixes superdeno@4.9.0 issue
Expand Down
19 changes: 11 additions & 8 deletions test/routes/searchdocs.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import { SearchDocsQueryParams } from '../../src/dto/request.ts';
import type { SearchDocsResponseDto } from '../../src/dto/response.ts';
import { assert, assertEquals, type IResponse, superoak } from '../deps.ts';

Deno.test({
name: 'SearchDocs route - it should return search results from cache on second request',
async fn() {
const testBody = (fn: (t: Deno.TestContext) => void | Promise<void>) => {
return async (t: Deno.TestContext) => {
Deno.env.set('APP_URL', `file:///${Deno.cwd()}/test/fixtures/`);
await fn(t);
}
};

Deno.test({
name: 'SearchDocs route - it should return search results from cache on second request',
fn: testBody(async () => {
const searchParams = new URLSearchParams();
searchParams.append(SearchDocsQueryParams.query, 'Skimming');

Expand All @@ -30,14 +35,12 @@ Deno.test({
assertResponse(response);
responseDto = response.body as SearchDocsResponseDto;
assertEquals(responseDto.results[0].cache, true);
},
}),
});

Deno.test({
name: 'SearchDocs route - it should return search results from remote on second request - skipCache',
async fn() {
Deno.env.set('APP_URL', `file:///${Deno.cwd()}/test/fixtures/`);

fn: testBody(async () => {
const searchParams = new URLSearchParams();
searchParams.append(SearchDocsQueryParams.query, 'Skimming');
searchParams.append(SearchDocsQueryParams.skipCache, 'true');
Expand All @@ -61,7 +64,7 @@ Deno.test({
assertResponse(response);
responseDto = response.body as SearchDocsResponseDto;
assertEquals(responseDto.results[0].cache, false);
},
}),
});

function assertResponse(response: IResponse) {
Expand Down
Loading