Skip to content
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

upstream func cli 1.13.0 and fixed build issues #341

Merged
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ public/lib
**/node_modules
Godeps
test-resources
test
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
node: [16.11.0]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run build
- name: Run headless test
uses: GabrielBB/xvfb-action@fe2609f8182a9ed5aee7d53ff3ed04098a904df2 #v1.0
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d #v1.6
with:
run: npm test
- name: Run UI tests
Expand All @@ -36,12 +36,12 @@ jobs:
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
with:
name: screenshots-${{ matrix.os }}
path: 'test-resources/**/screenshots/*.png'
retention-days: 2
if-no-files-found: warn
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 #v1
- uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab #v4.1.0
name: codecov-upload
with:
file: ./coverage/coverage-final.json
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.minimap.size": "fill",
"eslint.validate": [
Expand Down
17 changes: 14 additions & 3 deletions build/install-vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@
import { execSync } from 'child_process';
import { platform } from 'os';
import { dirname, join } from 'path';
import { downloadAndUnzipVSCode } from 'vscode-test';
import path = require('path');
import { downloadAndUnzipVSCode } from '@vscode/test-electron';

downloadAndUnzipVSCode()
.then((executable: string): void => {
const extensionsToInstall = ['redhat.vscode-yaml', 'ms-kubernetes-tools.vscode-kubernetes-tools'];
let exe: string = executable;
if (platform() === 'darwin') {
exe = `'${join(exe.substring(0, exe.indexOf('.app') + 4), 'Contents', 'Resources', 'app', 'bin', 'code')}'`;
} else {
exe = join(dirname(exe), 'bin', 'code');
}
execSync(`${exe} --install-extension ms-kubernetes-tools.vscode-kubernetes-tools`);
execSync(`${exe} --install-extension redhat.vscode-yaml`);
const extensionRootPath = path.resolve(__dirname, '..', '..');
const vsCodeTest = path.resolve(path.join(extensionRootPath, '.vscode-test'));
const userDataDir = path.join(vsCodeTest, 'user-data');
const extDir = path.join(vsCodeTest, 'extensions');
// eslint-disable-next-line no-restricted-syntax
for (const extension of extensionsToInstall) {
// eslint-disable-next-line no-console
console.log('Installing extension: ', extension);
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
execSync(`${exe} --install-extension ${extension} --user-data-dir ${userDataDir} --extensions-dir ${extDir}`);
}
})
// eslint-disable-next-line no-console, @typescript-eslint/restrict-template-expressions
.catch((err) => console.log(`There was an error while downloading and unzipping, error = ${err}`));
2 changes: 1 addition & 1 deletion build/unit-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import * as path from 'path';

import { runTests } from 'vscode-test';
import { runTests } from '@vscode/test-electron';

async function main(): Promise<void> {
try {
Expand Down
1 change: 1 addition & 0 deletions build/verify-tools.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-misused-promises */
/* eslint-disable no-await-in-loop */
Expand Down
Loading
Loading