Skip to content

Commit

Permalink
Merge branch 'redhat-developer:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanyaj3 authored Nov 12, 2024
2 parents e3779aa + ac0777d commit 9f1a1da
Show file tree
Hide file tree
Showing 32 changed files with 7,692 additions and 854 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@ name: CI
# Triggers the workflow on all pushes or pull requests on any branch
on:
push:
branches:
- '**'
branches:
- "**"
pull_request:
branches:
- '**'
branches:
- "**"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest,windows-latest] # Define the operating systems for the matrix
os: [
macos-latest,
ubuntu-latest,
windows-latest,
] # Define the operating systems for the matrix

steps:
# Checkout code
Expand All @@ -36,7 +40,7 @@ jobs:
- name: Run build
run: npm run package

# Generate .vsix package for the extension
# Generate .vsix package for the extension
- name: Generate .vsix package
if: runner.os == 'Linux'
run: |
Expand All @@ -45,11 +49,11 @@ jobs:
# Upload VSIX artifact
- name: Upload VSIX artifact
if: runner.os == 'Linux'
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: vscode-granite-vsix-${{ runner.os }}-${{ github.run_id }} # Unique name with OS and run ID
path: "./vscode-granite-*.vsix"
name: vscode-paver-vsix-${{ runner.os }}-${{ github.run_id }} # Unique name with OS and run ID
path: "./vscode-paver-*.vsix"

## Run tests
- name: Run Tests
Expand All @@ -61,6 +65,10 @@ jobs:
npm test
fi
# Run unit tests for react components
- name: Run Webview Tests
run: npm run test:jest

# Update latest release (only on Linux and for the main branch)
- name: Update latest release
if: runner.os == 'Linux' && github.ref == 'refs/heads/main'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

# Run install dependencies
- name: Install dependencies
Expand All @@ -89,17 +89,17 @@ jobs:
title: "${{ env.EXT_VERSION }}"
draft: true
files: |
vscode-granite-*.vsix
vscode-paver-*.vsix
- name: Publish to VS Code Marketplace
if: ${{ github.event_name == 'schedule' || inputs.publishToMarketPlace == 'true' || inputs.publishPreRelease == 'true' }}
run: |
npx @vscode/vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath vscode-granite-${{ env.EXT_VERSION }}.vsix
npx @vscode/vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath vscode-paver-${{ env.EXT_VERSION }}.vsix
- name: Publish to OpenVSX Registry
if: ${{ github.event_name == 'schedule' || inputs.publishToOVSX == 'true' || inputs.publishPreRelease == 'true' }}
run: |
npx ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --packagePath vscode-granite-${{ env.EXT_VERSION }}.vsix
npx ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --packagePath vscode-paver-${{ env.EXT_VERSION }}.vsix
post-release-job:
if: ${{ inputs.publishToMarketPlace == 'true' && inputs.publishToOVSX == 'true' && inputs.EXTENSION_TAG == 'main' }}
Expand All @@ -111,11 +111,11 @@ jobs:
- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"
- name: Upversion for Development
run: |
tag=`npm version --no-git-tag-version patch`
git config --global user.email "[email protected]"
git config --global user.name "redhat-developer-bot"
git commit -am "Upversion to ${tag#v}"
git push origin
git push origin
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"preLaunchTask": "${defaultBuildTask}",
"env": {
"REDHAT_TELEMETRY_ENABLED": "true",
"GRANITE_EXT_DEV_MODE": "true"
"PAVER_EXT_DEV_MODE": "true"
}
},
{
Expand All @@ -35,7 +35,7 @@
"env": {
"REDHAT_TELEMETRY_ENABLED": "false",
"MOCK_OLLAMA": "true",
"GRANITE_EXT_DEV_MODE": "true"
"PAVER_EXT_DEV_MODE": "true"
}
}
]
Expand Down
6 changes: 5 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ out/test/**
# Ignore source code
src/**

# Ignore images from README, as the github repo images will be referenced instead
media/**

# Ignore all webview-ui files except the build directory
webviews/src/**
webviews/public/**
Expand All @@ -35,4 +38,5 @@ esbuild.js
node_modules/**
out/**
DCO
.github/**
.github/**
releng/**
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Change Log

All notable changes to the "vscode-granite" extension will be documented in this file.
All notable changes to the `Paver` extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
to structure this file.

## [Unreleased]

- Initial release
- Initial release
43 changes: 27 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# How to Contribute

Contributions are essential for keeping this extension great. We try to keep it as easy as possible to contribute changes and we are open to suggestions for making it even easier. There are only a few guidelines that we need contributors to follow.
Contributions are essential for keeping this extension great. We try to keep it
as easy as possible to contribute changes and we are open to suggestions for
making it even easier. There are only a few guidelines that we need contributors
to follow.

## Development

### Installation Prerequisites:

* latest [Visual Studio Code](https://code.visualstudio.com/)
* [Node.js](https://nodejs.org/) v20.0.0 or higher
* optional: [gh](https://cli.github.com/) to manage pull requests.
- latest [Visual Studio Code](https://code.visualstudio.com/)
- [Node.js](https://nodejs.org/) v20.0.0 or higher
- optional: [gh](https://cli.github.com/) to manage pull requests.

### Steps

1. Fork and clone this repository

2. Change to the directory:

```bash
$ cd vscode-granite
$ cd vscode-paver
```

3. Install the NPM dependencies:

```bash
$ npm run install:ci
$ npm run install:ci
```
This will install the dependencies for the extension and its [webview(s)](https://code.visualstudio.com/api/extension-guides/webview)

This will install the dependencies for the extension and its
[webview(s)](https://code.visualstudio.com/api/extension-guides/webview)

4. To run the extension, open the Debugging tab in VSCode.

Expand All @@ -30,14 +39,15 @@ This will install the dependencies for the extension and its [webview(s)](https:
### Build the extension

You can package the extension as a *.vsix archive:
```bash
$ npx @vscode/vsce package
```

It will generate a vscode-granite-`<version>`.vsix
```bash
$ npx @vscode/vsce package
```

You can then install it in VS Code by following these [instructions](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).
It will generate a vscode-paver-`<version>`.vsix

You can then install it in VS Code by following these
[instructions](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).

## Contribute changes

Expand All @@ -51,12 +61,13 @@ Try to follow this workflow to contribute changes:
6. Open a pull request with a detailed description of your changes

With regards to git history, please:

- keep the git history linear, no merge commits.
- ensure PRs are squashed before merging, to keep changes atomic.

### Certificate of Origin

By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution. See the [DCO](DCO) file for details.
By contributing to this project you agree to the Developer Certificate of Origin
(DCO). This document was created by the Linux Kernel community and is a simple
statement that you, as a contributor, have the legal right to make the
contribution. See the [DCO](DCO) file for details.
Loading

0 comments on commit 9f1a1da

Please sign in to comment.