Skip to content

ci: swap deprecated xvfb Action #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2024
Merged
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
8 changes: 2 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -32,14 +32,10 @@ jobs:
- name: Test Syntax Highlighting
run: npm run test:grammar
- name: Test Unittests
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test
run: xvfb-run --auto-servernum npm run test
# This will not fail the job if tests fail so we have to npm test separately
- name: Coverage report
uses: GabrielBB/xvfb-action@v1
with:
run: npm run coverage
run: xvfb-run --auto-servernum npm run coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@
},
"fortran.linter.initialize": {
"type": "boolean",
"default": true,
"default": false,
"markdownDescription": "Attempt to initialize the linter by mock-compiling all files in the workspace.",
"order": 5
},
6 changes: 6 additions & 0 deletions src/lint/provider.ts
Original file line number Diff line number Diff line change
@@ -341,12 +341,15 @@
// 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');

Check warning on line 344 in src/lint/provider.ts

Codecov / codecov/patch

src/lint/provider.ts#L344

Added line #L344 was not covered by tests
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;
@@ -377,6 +380,8 @@
`[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);
@@ -392,6 +397,7 @@
);
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);
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}