Skip to content

Commit

Permalink
Merge pull request #178 from KxSystems/v1.1.0-dev-to-main
Browse files Browse the repository at this point in the history
V1.1.0 dev to main
  • Loading branch information
nfarrell-kx authored Nov 3, 2023
2 parents f88af42 + d6f09ce commit 3d9a9ba
Show file tree
Hide file tree
Showing 68 changed files with 6,989 additions and 3,777 deletions.
39 changes: 39 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing to kdb VS Code Extension

Your input is very welcome, some examples of this include:

- Reporting a bug
- Submitting a fix
- Proposing new features

## Reporting a bug

Bugs can be reported via [Issues](https://github.com/KxSystems/kx-vscode/issues)

Where possible include:

- Quick summary and/or background
- Steps to reproduce
- Be specific
- Provide sample code if you can
- What you expected would happen
- What actually happens
- Other relevant notes

## Submitting a fix

Fixes can be submitted via a pull request:

1. Fork the repo and create your branch from `dev`
2. If you've added code that should be tested, add tests
3. Ensure the test suite passes, using `npm run test`
4. Apply the prettier formatting, using a plugin or manually using `npm run format`
5. Create a pull request for your branch

### License

When you submit code changes your submissions are understood to be under the same [Apache 2.0](https://github.com/KxSystems/kx-vscode/blob/main/LICENSE) that covers the project. Please feel free to contact the maintainers if that's a concern.

## Proposing a new feature

Please use [email protected] to raise any questions, feature requests or feedback.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG.YML
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
projects: ["KxSystems/kx-vscode"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to complete this bug report
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of the extension are you running?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output (e.g. contents of the 'kdb' Output pane)
render: shell
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Changes introduced by this PR

-
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
name: lcov

- name: Install dependencies
run: yarn install
run: npm install

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@master
Expand Down
137 changes: 137 additions & 0 deletions .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: KX VS Code Production Release Workflow

on:
push:
tags:
- "v[129].[0-9]+.[0-9]+"

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: npm run build
- name: Run Tests
run: xvfb-run -a npm run test
- name: Packaging
run: npm 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: npm 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

release:
needs: app-sec
runs-on: ubuntu-latest
steps:
- name: Set Tag Var
id: vars
run: |
VERSION=${{ github.ref_name }}
echo "run_tag=$(echo ${VERSION:1})" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download VSIX file from build job
uses: actions/download-artifact@v3
with:
name: KDB-VSCode-Extension
- name: Get Body
run: |
sed -n "/# ${{ github.ref_name }}/,/# v/{s/^# .*//;p;}" CHANGELOG.md > temp.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref_name }}
body_path: ./temp.md
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: kdb-${{ steps.vars.outputs.run_tag }}.vsix
asset_name: kdb-${{ steps.vars.outputs.run_tag }}.vsix
asset_content_type: application/octet-stream

# manual-approve:
# needs: release
# environment:
# name: approvers
# runs-on: ubuntu-latest
# steps:
# - name: Manual Approve
# run: echo "Manually approved"

# publish:
# needs: manual-approve
# - 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: Publish to VSCode Marketplace
# run: npm run publish
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Install dependencies
run: npm ci --include=dev
- name: Build VSIX file
run: yarn run build
run: npm run build
- name: Run Tests
run: xvfb-run -a yarn run coverage
run: xvfb-run -a npm run coverage
- name: Packaging
run: yarn run package
run: npm run package
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -56,7 +56,11 @@ jobs:
node-version: 16.x

- name: Install dependencies
run: yarn install
run: npm install

- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]

- name: Download lcov result from test job
uses: actions/download-artifact@v3
Expand All @@ -65,9 +69,13 @@ jobs:

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@master
continue-on-error: true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectVersion=${{ steps.package-version.outputs.current-version}}
- name: Snyk scan for all vulnerabilities
uses: snyk/actions/node@master
Expand All @@ -77,13 +85,15 @@ jobs:

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

- name: Snyk Monitor
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.pink_snyk_api_key }}
with:
Expand Down
Loading

0 comments on commit 3d9a9ba

Please sign in to comment.