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

📖 Test commit #4

Closed
wants to merge 4 commits into from
Closed
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
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
## PR Title Prefix

Every **PR Title** should be prefixed with :text: to indicate its type.

- Breaking change: :warning: (`:warning:`)
- Non-breaking feature: :sparkles: (`:sparkles:`)
- Patch fix: :bug: (`:bug:`)
- Docs: :book: (`:book:`)
- Infra/Tests/Other: :seedling: (`:seedling:`)
- No release note: :ghost: (`:ghost:`)

For example, a pull request containing breaking changes might look like
`:warning: My pull request contains breaking changes`.

Since GitHub supports emoji aliases (ie. `:ghost:`), there is no need to include
the emoji directly in the PR title -- **please use the alias**. It used to be
the case that projects using emojis for PR typing had to include the emoji
directly because GitHub didn't render the alias. Given that `:warning:` is
easy enough to read as text, easy to parse in release tooling, and rendered in
GitHub well, we prefer to standardize on the alias.

For more information, please see the Konveyor
[Versioning Doc](https://github.com/konveyor/release-tools/blob/main/VERSIONING.md).
-->
84 changes: 84 additions & 0 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI (repo level)

on:
push:
branches:
- "main"
- "release-*"

pull_request:
branches:
- "main"
- "release-*"

workflow_dispatch:

workflow_call:

concurrency:
group: ci-repo-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
package-tests:
runs-on: ubuntu-latest

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"

- name: Cache extension node_modules
uses: actions/cache@v3
with:
path: vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }}

- name: Install dependencies
run: |
cd vscode
npm version
npm ci

- name: Lint sources
run: |
cd vscode
npm run lint

- name: Build
run: |
cd vscode
npm run package

vscode-tests:
runs-on: ubuntu-latest

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: "vscode/.nvmrc"

- name: Cache extension node_modules
uses: actions/cache@v3
with:
path: vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }}

- name: Install dependencies
run: |
cd vscode
npm version
npm ci
- name: Run extension
run: |
cd vscode
xvfb-run -a npm run test

11 changes: 11 additions & 0 deletions .github/workflows/nightly-ci-repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly CI (repo level @main)

on:
schedule:
- cron: "35 5 * * *" # every day @ 5:35am UTC

workflow_dispatch:

jobs:
nightly:
uses: ./.github/workflows/ci-repo.yml
16 changes: 16 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: PR Checks

on:
pull_request_target:
types: [opened, edited, reopened, synchronize]

jobs:
verify:
runs-on: ubuntu-latest
name: Verify PR contents
steps:
- name: Check Title
id: verifier
uses: konveyor/release-tools/cmd/verify-pr@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Project Owners

This file specifies the code owners of the project.

## Our Maintainers

- David Zager ([djzager](https://github.com/djzager))
- Ian Bolton ([ibolton336](https://github.com/ibolton336))
- Scott Dickerson ([sjd78](https://github.com/sjd78))
- Radoslaw Szwajkowski ([rszwajko](https://github.com/rszwajko))
1 change: 1 addition & 0 deletions vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
out
dist
node_modules
test_out
.vscode-test/
*.vsix
1 change: 1 addition & 0 deletions vscode/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.12.2
13 changes: 13 additions & 0 deletions vscode/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Library, IDE and build locations
**/node_modules/
**/coverage/
**/dist/
**/out/
.vscode/
.idea/
.eslintcache/

#
# NOTE: Could ignore anything that eslint will look at since eslint also applies
# prettier.
#
15 changes: 15 additions & 0 deletions vscode/.prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import("prettier").Config} */
const config = {
// default value used
// trailingComma: "all",
// semi: true,
// singleQuote: false,

// Values used from .editorconfig:
// - printWidth == max_line_length
// - tabWidth == indent_size
// - useTabs == indent_style
// - endOfLine == end_of_line
};

export default config;
4 changes: 2 additions & 2 deletions vscode/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@vscode/test-cli';
import { defineConfig } from "@vscode/test-cli";

export default defineConfig({
files: 'out/test/**/*.test.js',
files: "test_out/test/**/*.test.js",
});
6 changes: 6 additions & 0 deletions vscode/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
| branch | last merge CI | nightly CI |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| main | [![CI (repo level)](https://github.com/konveyor/editor-extensions/actions/workflows/ci-repo.yml/badge.svg?branch=main&event=push)](https://github.com/konveyor/editor-extensions/actions/workflows/ci-repo.yml?query=branch%3Amain+event%3Apush) | [![Nightly CI (repo level @main)](https://github.com/konveyor/editor-extensions/actions/workflows/nightly-ci-repo.yaml/badge.svg?branch=main&event=schedule)](https://github.com/konveyor/editor-extensions/actions/workflows/nightly-ci-repo.yaml?query=branch%3Amain+event%3Aschedule) |



# konveyor-vscode README

This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections.
Expand Down
95 changes: 79 additions & 16 deletions vscode/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,28 +1,91 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import tsEslint from "typescript-eslint";
import prettierRecommended from "eslint-plugin-prettier/recommended";
import prettier from "eslint-plugin-prettier";
import unusedImports from "eslint-plugin-unused-imports";
import react from "eslint-plugin-react";
import globals from "globals";
import eslint from "@eslint/js";

export default [{
files: ["**/*.ts"],
}, {
export default [
eslint.configs.recommended,
...tsEslint.configs.recommended,
react.configs.flat.recommended,
prettierRecommended,
{
files: [
"**/*.js",
"**/*.jsx",
"**/*.cjs",
"**/*.mjs",
"**/*.ts",
"**/*.tsx",
],
},
{
plugins: {
"@typescript-eslint": typescriptEslint,
"@typescript-eslint": typescriptEslint,
prettier,
"unused-imports": unusedImports,
react,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",
parser: tsParser,
ecmaVersion: 2023, // keep in sync with tsconfig.json
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.es2023,
...globals.node,
myCustomGlobal: "readonly",
},
},

rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "import",
format: ["camelCase", "PascalCase"],
},
],

curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",

"prettier/prettier": ["warn"],
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
"unused-imports/no-unused-imports": ["warn"],
"@typescript-eslint/no-explicit-any": "warn",
"react/jsx-key": "warn",
// "react-hooks/rules-of-hooks": "warn",
// "react-hooks/exhaustive-deps": "warn",
"no-extra-boolean-cast": "warn",
"prefer-const": "warn",
"react/no-unknown-property": ["warn"],
},

settings: {
react: { version: "detect" },
},
}];

ignores: [
// take the place of `.eslintignore`
"dist/",
"out/",
"generated/",
"node_modules/",
],
},
];
Loading
Loading