Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
44 changes: 40 additions & 4 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,61 @@ jobs:
with:
node-version: 20

- name: Remove Yarn on Windows
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should need to do this. What specifically is failing if you don't do this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I will remove it once code ready. I am just testing it is any yarn. If so just deleted

if: runner.os == 'Windows'
shell: powershell
run: |
$paths = @(
"$env:USERPROFILE\.yarn\bin\yarn.cmd",
"$env:USERPROFILE\.yarn\bin\yarnpkg.cmd",
"C:\Program Files (x86)\Yarn\bin\yarn.cmd",
"C:\Program Files (x86)\Yarn\bin\yarnpkg.cmd",
"C:\Program Files\Yarn\bin\yarn.cmd",
"C:\Program Files\Yarn\bin\yarnpkg.cmd"
)
foreach ($path in $paths) {
if (Test-Path $path) {
Remove-Item $path -Force
}
}
if (Get-Command yarn -ErrorAction SilentlyContinue) {
yarn --version
} else {
Write-Output "✅ Yarn not found"
}

- name: Remove Yarn on Linux/macOS
if: runner.os != 'Windows'
run: |
rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg
rm -f /Users/runner/.yarn/bin/yarn /Users/runner/.yarn/bin/yarnpkg
echo "🧹 Yarn removed"

- name: Check for yarn
run: |
which yarn || echo "✅ Yarn not found"
yarn --version || echo "✅ Yarn not used"


# Run install dependencies
- name: Install dependencies
run: yarn
run: npm ci

# Build extension
- name: Run build
run: yarn build
run: npm run build

# Run tests
- name: Run Test
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
with:
run: yarn test
run: npm test

# Run UI tests
- name: Run UI Test
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
with:
run: yarn run ui-test
run: npm run ui-test
options: -screen 0 1920x1080x24

#Package vsix
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
node-version: 20
- name: Install dependencies
run: |
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
npm install -g typescript "@vscode/vsce" "ovsx"
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Build vscode-yaml
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
with:
run: |
yarn install
yarn run build
yarn run check-dependencies
npm ci
npm run build
npm run check-dependencies
- name: Run Unit Tests
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
with:
run: yarn test --silent
run: npm test --silent
- name: Package
run: |
vsce package -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
node-version: 20
- name: Install dependencies
run: |
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
npm install -g typescript "@vscode/vsce" "ovsx"
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Download VSIX Artifacts
uses: actions/download-artifact@v4
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ dist/
test/testFixture/.vscode
*.vsix
.DS_Store
test-resources
yarn-error.log
test-resources/
yarn.lock
.yarnrc
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// the command is a shell script
"type": "shell",
// we run the custom npm script "compile" as defined in package.json
"command": "yarn run compile",
"command": "npm run compile",
// show the output window only if unrecognized errors occur.
"presentation": {
"reveal": "never"
Expand All @@ -32,7 +32,7 @@
// the command is a shell script
"type": "shell",
// we run the custom npm script "compile" as defined in package.json
"command": "yarn test-compile",
"command": "npm run test-compile",
// show the output window only if unrecognized errors occur.
"presentation": {
"reveal": "never"
Expand Down
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ All contributions are welcome!

3. Open the `vscode-yaml` folder in VSCode, and then add the `yaml-language-server` project to the workspace using `File -> Add Folder to Workspace...`.

4. Run `yarn install` in both directories to initialize `node_modules` dependencies.
4. Run `npm run install` in both directories to initialize `node_modules` dependencies.

5. To run the language server in VSCode, click `View -> Debug`, then from the drop down menu beside the green arrow select `Launch Extension (vscode-yaml)`, click the arrow, and a new VSCode window should load with the YAML LS running.

Expand Down
13 changes: 6 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
def installBuildRequirements(){
def nodeHome = tool 'nodejs-lts'
env.PATH="${env.PATH}:${nodeHome}/bin"
sh "npm install --global yarn"
sh "npm install --global vsce"
}

def buildVscodeExtension(){
sh "yarn install"
sh "yarn run vscode:prepublish"
sh "npm run install"
sh "npm run vscode:prepublish"
}

node('rhel8'){
Expand All @@ -22,13 +21,13 @@ node('rhel8'){
installBuildRequirements()

stage 'Build vscode-yaml'
sh "yarn install"
sh "yarn run build"
sh "yarn run check-dependencies"
sh "npm run install"
sh "npm run build"
sh "npm run check-dependencies"

stage 'Test vscode-yaml for staging'
wrap([$class: 'Xvnc']) {
sh "yarn test --silent"
sh "npm test --silent"
}

stage "Package vscode-yaml"
Expand Down
Loading
Loading