Skip to content

Commit

Permalink
Merge branch 'dev' into ga-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kxbmcallister committed Sep 6, 2023
2 parents 6805a7a + bffc550 commit a4d9530
Show file tree
Hide file tree
Showing 39 changed files with 5,281 additions and 2,628 deletions.
Binary file removed .DS_Store
Binary file not shown.
43 changes: 39 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This workflow runs the tests across Linux, Mac, Windows

name: KX VS Code CI
name: KX VS Code CI Testing

on:
push:
branches: ['main']
pull_request:
branches: ['main']
branches-ignore:
- dev
- main

jobs:
test:
Expand All @@ -27,3 +27,38 @@ jobs:
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'

app-sec:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install dependencies
run: yarn install

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Snyk scan for all vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}

- name: Snyk scan for high or critical vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}
with:
args: --severity-threshold=high
96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: KX VS Code Release Workflow

on:
push:
branches:
- dev
- main

env:
NODE_ENV: production

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm ci --include=dev
- name: Build VSIX file
run: yarn run build
- name: Run Tests
run: xvfb-run -a yarn run test
- name: Packaging
run: yarn run package
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: KDB-VSCode-Extension
path: ./kdb-*vsix

app-sec:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install dependencies
run: yarn install

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Snyk scan for all vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}

- name: Snyk scan for high or critical vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}
with:
args: --severity-threshold=high

- name: Snyk Monitor
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}
with:
command: monitor
args: --target-reference=${{ github.ref_name }}

release:
runs-on: ubuntu-latest
needs: app-sec
steps:
- name: Download VSIX file from build job
uses: actions/download-artifact@v3
with:
name: KDB-VSCode-Extension
- name: Release to Portal
run: |
NOW=$(date +'%Y%m%dT%H%M%S')
curl -L -s --fail-with-body -D /dev/stderr --oauth2-bearer ${{ secrets.kx_downloads_token_prod }} \
-H 'content-type: application/octet-stream' \
--upload-file ./kdb-*.vsix \
https://portal.dl.kx.com/assets/raw/kdb-vscode/${{ github.ref_name }}/kdb-${{ github.ref_name }}.$NOW.vsix
16 changes: 15 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"outFiles": ["${workspaceFolder}/out/extension.js*"],
"preLaunchTask": "npm: watch"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/out/server.js"]
},
{
"name": "Extension Tests",
"type": "extensionHost",
Expand All @@ -24,5 +32,11 @@
"outFiles": ["${workspaceFolder}/test/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
],
"compounds": [
{
"name": "Extension + Server",
"configurations": ["Run Extension", "Attach to Server"]
}
]
}
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to the kdb extension will be documented in this file.

# 0.1.16
# 0.1.18

### Enhancements

Expand All @@ -14,17 +14,25 @@ All notable changes to the kdb extension will be documented in this file.

- Added ability to execute q against Insights Scratchpad

### Fixes

- Fixes for Language Server, improving functionality and performance

### Internal Improvements

- Updated refresh icon

- Updated license and CI

- Language Server refactor
# 0.1.17

### Internal Improvements

- KX Language Server improvements

# 0.1.16

### Internal Improvements

- Renamed to 'kdb'

- Preview KX Language Server implementation

# 0.1.15

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

This is a companion extension for kdb developers. It provides editing capabilities for working with q files, and the ability to connect to kdb processes and run queries.

[![KX VS Code CI](https://github.com/KxSystems/kx-vscode/actions/workflows/ci.yml/badge.svg)](https://github.com/KxSystems/kx-vscode/actions/workflows/ci.yml)
[![KX VS Code CI Testing](https://github.com/KxSystems/kx-vscode/actions/workflows/ci.yml/badge.svg)](https://github.com/KxSystems/kx-vscode/actions/workflows/ci.yml)

[![KX VS Code Release](https://github.com/KxSystems/kx-vscode/actions/workflows/release.yml/badge.svg)](https://github.com/KxSystems/kx-vscode/actions/workflows/release.yml)

## Contents

Expand Down
27 changes: 23 additions & 4 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,33 @@ const webviewConfig = {
target: "es2020",
format: "esm",
entryPoints: ["./src/webview/main.ts"],
external: ["vscode"],
outfile: "./out/webview.js",
plugins: [
copy({
resolveFrom: "cwd",
assets: {
from: ["src/webview/styles/*.css"],
to: ["./out"],
},
assets: [
{
from: ["src/webview/styles/*.css"],
to: ["./out"],
},
{
from: ["node_modules/ag-grid-community/styles/ag-grid.min.css"],
to: ["./out"],
},
{
from: [
"node_modules/ag-grid-community/styles/ag-theme-alpine.min.css",
],
to: ["./out"],
},
{
from: [
"node_modules/ag-grid-community/dist/ag-grid-community.min.js",
],
to: ["./out"],
},
],
}),
],
};
Expand Down
Loading

0 comments on commit a4d9530

Please sign in to comment.