Skip to content

Commit

Permalink
Move metals-vscode to a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed Mar 20, 2023
1 parent 07c318e commit 2a58bc7
Show file tree
Hide file tree
Showing 109 changed files with 64 additions and 23 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: yarn test
- run: |
cd packages/metals-vscode
yarn install
- run: |
cd packages/metals-vscode
yarn test
extension-test:
name: Extension test
Expand All @@ -25,9 +29,13 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: |
cd packages/metals-vscode
yarn install
- name: Run extension tests
run: xvfb-run -a yarn test-extension
run: |
cd packages/metals-vscode
xvfb-run -a yarn test-extension
# In headless Linux CI machines xvfb is required to run VS Code
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions

Expand All @@ -39,8 +47,12 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: yarn build
- run: |
cd packages/metals-vscode
yarn install
- run: |
cd packages/metals-vscode
yarn build
prettier:
name: Prettier
Expand All @@ -50,8 +62,12 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: yarn format-check
- run: |
cd packages/metals-vscode
yarn install
- run: |
cd packages/metals-vscode
yarn format-check
eslint:
name: Eslint
Expand All @@ -61,5 +77,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: yarn eslint .
- run: |
cd packages/metals-vscode
yarn install
- run: |
cd packages/metals-vscode
yarn eslint .
3 changes: 3 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Scalameta bot"
- run: |
cd packages/metals-vscode
yarn install
yarn version --no-git-tag-version --patch
- name: Commit changes
Expand All @@ -34,6 +35,7 @@ jobs:
# but we don't want to force normal users to update, modify it
- name: Update required vs code version
run: |
cd packages/metals-vscode
node ./update-version.js
yarn install
- name: Publish pre-release version to Visual Studio Marketplace
Expand All @@ -43,6 +45,7 @@ jobs:
registryUrl: https://marketplace.visualstudio.com
preRelease: true
yarn: true
packagePath: "./packages/metals-vscode"
# Don't publish for VSX, it doesn't support pre-release versions
# Push changes - increased patch version
- name: Push changes
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
- name: Get the tag version
id: get_version
run: echo ::set-output name=NEW_VERSION::${GITHUB_REF#refs/tags/v}
- run: yarn install
- run: |
cd packages/metals-vscode
yarn install
- run: |
cd packages/metals-vscode
yarn version --no-git-tag-version --new-version ${{ steps.get_version.outputs.NEW_VERSION }}
- name: Generate changelog
run: |
Expand All @@ -33,9 +36,13 @@ jobs:
- name: Push changes
run: git push origin HEAD:main
- name: Publish extension
run: yarn vscode:publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }}
run: |
cd packages/metals-vscode
yarn vscode:publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }}
- name: Build VSIX package
run: yarn build
run: |
cd packages/metals-vscode
yarn build
- name: Get upload url
id: get_upload_url
run: |
Expand All @@ -47,7 +54,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.UPLOAD_URL }}
asset_path: ./metals-${{ steps.get_version.outputs.NEW_VERSION }}.vsix
asset_path: ./packages/metals-vscode/metals-${{ steps.get_version.outputs.NEW_VERSION }}.vsix
asset_name: |
scalameta.metals-${{ steps.get_version.outputs.NEW_VERSION }}.vsix
asset_content_type: application/octet-stream
Expand All @@ -56,4 +63,5 @@ jobs:
env:
OVSX_PAT: ${{ secrets.OVSX_TOKEN }}
run: |
cd packages/metals-vscode
yarn ovsx:publish --pat $OVSX_PAT ./metals-${{ steps.get_version.outputs.NEW_VERSION }}.vsix
9 changes: 7 additions & 2 deletions .github/workflows/sourcegraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: yarn install
- run: |
cd packages/metals-vscode
yarn install
- name: index
run: yarn run scip-typescript index
run: |
cd packages/metals-vscode
yarn run scip-typescript index
- name: src lsif upload
run: |
cd packages/metals-vscode
mkdir -p bin
curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o bin/src
chmod +x bin/src
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json → packages/metals-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@
"vscode:publish": "vsce publish --yarn",
"ovsx:publish": "ovsx publish",
"lint": "eslint . --ext .ts --fix && yarn format",
"format": "prettier --write **/*.{ts,js,json,yml}",
"format-check": "prettier --check **/*.{ts,js,json,yml}"
"format": "prettier --write **/*.{ts,js,json}",
"format-check": "prettier --check **/*.{ts,js,json}"
},
"devDependencies": {
"@sourcegraph/scip-typescript": "^0.3.7",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions packages/metals-vscode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "out"
},
"exclude": ["node_modules", ".vscode-test", "src/test/unit"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"outDir": "out",
"lib": ["es2018"],
"sourceMap": true,
"rootDir": "src",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"exclude": ["node_modules", ".vscode-test", "src/test/unit"]
"skipLibCheck": true,
}
}

0 comments on commit 2a58bc7

Please sign in to comment.