Skip to content

Commit b91f2a1

Browse files
committed
wip
1 parent 8da2060 commit b91f2a1

File tree

5 files changed

+97
-8
lines changed

5 files changed

+97
-8
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Dashmips Debugger"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "feature/**"
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: actions/setup-node@v2-beta
20+
with:
21+
node-version: "12"
22+
23+
- run: npm install
24+
25+
- name: Run headless test
26+
uses: GabrielBB/xvfb-action@v1.2
27+
with:
28+
run: npm test

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- "*" # Push events to matching '*', i.e. 1.0, 20.15.10
6+
7+
name: Upload Release Asset
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2-beta
16+
with:
17+
node-version: "12"
18+
19+
- run: npm install
20+
21+
# makes ./dashmips-debugger-{version}.vsix
22+
- name: Run headless test
23+
uses: GabrielBB/xvfb-action@v1.2
24+
with:
25+
run: |
26+
npm test
27+
28+
- run: npm run package
29+
30+
- name: Get the version
31+
id: get_version
32+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
33+
shell: bash
34+
35+
- name: Create Release
36+
id: create_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: ${{ github.ref }}
42+
release_name: Release ${{ github.ref }}
43+
draft: false
44+
prerelease: false
45+
46+
- name: Upload Release Asset
47+
id: upload-release-asset
48+
uses: actions/upload-release-asset@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
53+
asset_path: ./dashmips-debugger-${{ steps.get_version.outputs.VERSION }}.vsix
54+
asset_name: dashmips-debugger-${{ steps.get_version.outputs.VERSION }}.vsix
55+
asset_content_type: application/vsix
56+
57+
- name: Publish Extension
58+
run: |
59+
npm run publish
60+
env:
61+
VSCE_PAT: ${{ secrets.VS_MARKETPLACE }}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@
239239
"scripts": {
240240
"vscode:prepublish": "rimraf ./out && npm run build",
241241
"build": "tsc",
242+
"package": "vsce package",
242243
"watch": "tsc --watch",
243-
"publish": "npx vsce publish",
244+
"publish": "vsce publish",
244245
"pretest": "npm run build && npm run lint",
245246
"test": "node ./out/test/runTest.js",
246247
"lint": "eslint src --ext ts --fix"
@@ -262,7 +263,7 @@
262263
"rimraf": "^3.0.2",
263264
"typescript": "^3.9.5",
264265
"utf-8-validate": "^5.0.2",
265-
"vsce": "^1.76.1",
266+
"vsce": "^1.77.0",
266267
"vscode-debugadapter-testsupport": "^1.41.0",
267268
"vscode-test": "^1.3.0"
268269
},

src/test/runTest.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as path from 'path'
2-
32
import { runTests } from 'vscode-test'
43

54
async function main() {
@@ -13,7 +12,7 @@ async function main() {
1312
const extensionTestsPath = path.resolve(__dirname, './suite/index')
1413

1514
// Download VS Code, unzip it and run the integration test
16-
await runTests({ extensionDevelopmentPath, extensionTestsPath })
15+
await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: ['--disable-extensions'] })
1716
} catch (err) {
1817
console.error('Failed to run tests')
1918
process.exit(1)

0 commit comments

Comments
 (0)