Skip to content

Commit

Permalink
Revert "ci: swap deprecated xvfb Action"
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikit committed May 6, 2024
1 parent b48b264 commit 44b688a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ jobs:
- name: Test Syntax Highlighting
run: npm run test:grammar
- name: Test Unittests
run: xvfb-run --auto-servernum npm run test
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test
# This will not fail the job if tests fail so we have to npm test separately
- name: Coverage report
run: xvfb-run --auto-servernum npm run coverage
uses: GabrielBB/xvfb-action@v1
with:
run: npm run coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
},
"fortran.linter.initialize": {
"type": "boolean",
"default": false,
"default": true,
"markdownDescription": "Attempt to initialize the linter by mock-compiling all files in the workspace.",
"order": 5
},
Expand Down
6 changes: 0 additions & 6 deletions src/lint/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,12 @@ export class FortranLintingProvider {
// Discard the previous diagnostic state for this document
if (this.fortranDiagnostics.has(document.uri)) this.fortranDiagnostics.delete(document.uri);
this.logger.debug('[lint] No linting diagnostics to show');
console.log('[lint] No linting diagnostics to show');
return;
}
let diagnostics: vscode.Diagnostic[] = this.linter.parse(output);
console.log('[lint] Parsing output to vscode.Diagnostics', diagnostics);
this.logger.debug('[lint] Parsing output to vscode.Diagnostics', diagnostics);
// Remove duplicates from the diagnostics array
diagnostics = [...new Map(diagnostics.map(v => [JSON.stringify(v), v])).values()];
console.log('[lint] Removing duplicates. vscode.Diagnostics are now:', diagnostics);
this.logger.debug('[lint] Removing duplicates. vscode.Diagnostics are now:', diagnostics);
this.fortranDiagnostics.set(document.uri, diagnostics);
return diagnostics;
Expand Down Expand Up @@ -380,8 +377,6 @@ export class FortranLintingProvider {
`[build.single] compiler: "${this.settings.compiler}" located in: "${command}"`
);
this.logger.info(`[build.single] Compiler query command line: ${command} ${argList.join(' ')}`);
console.log(`[build.single] compiler: "${this.settings.compiler}" located in: "${command}"`);
console.log(`[build.single] Compiler query command line: ${command} ${argList.join(' ')}`);

try {
const fypp = await this.getFyppProcess(document);
Expand All @@ -397,7 +392,6 @@ export class FortranLintingProvider {
);
const output: string = stdout + stderr;
this.logger.debug(`[build.single] Compiler output:\n${output}`);
console.log(`[build.single] Compiler output:\n${output}`);
return output;
} catch (err) {
this.logger.error(`[build.single] Compiler error:`, err);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"resolveJsonModule": true,
"esModuleInterop": true,
"removeComments": true,
"rootDir": "."
"rootDir": ".",
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": ["node_modules", ".vscode-test", "assets/videos"]
"exclude": ["node_modules", ".vscode-test", "assets/videos"],
}

0 comments on commit 44b688a

Please sign in to comment.