Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Feb 17, 2024
2 parents bb4e6a8 + 7c598f2 commit 169552e
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "publish-extensions",
"image": "mcr.microsoft.com/devcontainers/base",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/shyim/devcontainers-features/bun:0": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/java:1": {}
}
}
4 changes: 2 additions & 2 deletions .github/workflows/publish-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
node-version: "18.x"
- uses: oven-sh/setup-bun@v1
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
if: ${{ !github.event.inputs.extensions }} # only run on full runs
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
node-version: "18.x"
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-once.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: node publish-extensions
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
node-version: "18.x"
- name: Download extension file
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Sonar
on:
workflow_run:
workflows: [Validate PR]
types: [completed]
jobs:
sonar:
name: Sonar
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Download PR number artifact
if: github.event.workflow_run.event == 'pull_request'
uses: dawidd6/action-download-artifact@v3
with:
workflow: Validate PR
run_id: ${{ github.event.workflow_run.id }}
name: PR_NUMBER
- name: Read PR_NUMBER.txt
if: github.event.workflow_run.event == 'pull_request'
id: pr_number
uses: juliangruber/read-file-action@v1
with:
path: ./PR_NUMBER.txt
- name: Request GitHub API for PR data
if: github.event.workflow_run.event == 'pull_request'
uses: octokit/[email protected]
id: get_pr_data
with:
route: GET /repos/{full_name}/pulls/{number}
number: ${{ steps.pr_number.outputs.content }}
full_name: ${{ github.event.repository.full_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
- name: Checkout base branch
if: github.event.workflow_run.event == 'pull_request'
run: |
git remote add upstream ${{ github.event.repository.clone_url }}
git fetch upstream
git checkout -B ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} upstream/${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
git checkout ${{ github.event.workflow_run.head_branch }}
git clean -ffdx && git reset --hard HEAD
- name: SonarCloud Scan on PR
if: github.event.workflow_run.event == 'pull_request'
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
-Dsonar.pullrequest.key=${{ fromJson(steps.get_pr_data.outputs.data).number }}
-Dsonar.pullrequest.branch=${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}
-Dsonar.pullrequest.base=${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
- name: SonarCloud Scan on push
if: github.event.workflow_run.event == 'push' && github.event.workflow_run.head_repository.full_name == github.event.repository.full_name
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
-Dsonar.branch.name=${{ github.event.workflow_run.head_branch }}
13 changes: 12 additions & 1 deletion .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
node-version: "18.x"
- uses: oven-sh/setup-bun@v1
Expand Down Expand Up @@ -44,3 +44,14 @@ jobs:
/tmp/result.md
- name: Upload job summary
run: cat /tmp/result.md >> $GITHUB_STEP_SUMMARY
- name: Save PR number to file
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER.txt


28 changes: 27 additions & 1 deletion extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,18 @@
],
"extensionFile": "black-formatter.vsix"
},
"ms-python.debugpy": {
"repository": "https://github.com/microsoft/vscode-python-debugger",
"custom": [
"python -m pip install -U pip pipx wheel",
"npm ci --prefer-offline",
"python -m pipx run nox --session install_bundled_libs",
"vsce package --target=linux-x64",
"vsce package --target=darwin-arm64",
"vsce package --target=win32-x64"
],
"target": ["linux-x64", "darwin-arm64", "win32-x64"]
},
"ms-python.flake8": {
"repository": "https://github.com/microsoft/vscode-flake8",
"custom": [
Expand Down Expand Up @@ -854,11 +866,25 @@
},
"ms-python.python": {
"repository": "https://github.com/microsoft/vscode-python",
"prepublish": "npx gulp installPythonLibs && python3 -m pip --disable-pip-version-check install packaging && python3 ./pythonFiles/install_debugpy.py && python3 ./pythonFiles/download_get_pip.py && python3 ./build/update_ext_version.py --release --for-publishing && npm run addExtensionPackDependencies && DISABLE_TRANSLATIONS=true npm run package",
"custom": [
"python -m pip install -U pip",
"python -m pip install wheel",
"python -m pip install --no-deps --require-hashes --only-binary :all: -t ./pythonFiles/lib/python --implementation py -r requirements.txt",
"python -m pip --disable-pip-version-check install packaging",
"python ./pythonFiles/install_debugpy.py",
"python ./pythonFiles/download_get_pip.py",
"python -m pip install --no-deps --require-hashes --only-binary :all: -t ./pythonFiles/lib/jedilsp --implementation py --platform any --abi none -r ./pythonFiles/jedilsp_requirements/requirements.txt",
"npm ci --prefer-offline",
"npm run addExtensionPackDependencies",
"npm run package"
],
"extensionFile": "ms-python-insiders.vsix",
"pythonVersion": "3.8",
"timeout": 30
},
"MS-SarifVSCode.sarif-viewer": {
"repository": "https://github.com/Microsoft/sarif-vscode-extension"
},
"ms-toolsai.jupyter": {
"repository": "https://github.com/microsoft/vscode-jupyter",
"custom": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"find-up": "^5.0.0",
"human-number": "^2.0.0",
"minimist": "^1.2.5",
"octokit": "^2.0.2",
"octokit": "^3.1.2",
"ovsx": "latest",
"semver": "^7.1.3"
},
Expand Down
12 changes: 12 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sonar.projectKey=open-vsx_publish-extensions
sonar.organization=open-vsx

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=publish-extensions
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 169552e

Please sign in to comment.