Skip to content

Commit b9ae3dc

Browse files
authored
VSCONDEC-16: Build and test Visual Studio Code ConDec plug-in via GitHub actions (#5)
* Add dependabot config to support updating dependencies * Add github action config * Remove .travis.yml config file * Update version to 0.0.2
1 parent 614e0b0 commit b9ae3dc

File tree

9 files changed

+57
-30
lines changed

9 files changed

+57
-30
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10

.github/workflows/maven.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Continuous integration
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-node@v2
9+
with:
10+
node-version: '14'
11+
- name: Build and test
12+
run: |
13+
sudo apt-get install xvfb
14+
npm install
15+
npm install codecov -g
16+
npm install -g vsce
17+
npm run vscode:prepublish
18+
xvfb-run --auto-servernum npx nyc npm run test
19+
mkdir coverage
20+
npx nyc report --reporter=text --include=src --exclude src/test
21+
npx nyc report --reporter=clover --include=src --exclude src/test
22+
vsce package -o cures-condec-vscode.vsix
23+
- name: Report test coverage via Codecov
24+
uses: codecov/codecov-action@v1.5.2
25+
with:
26+
files: coverage/clover.xml
27+
- name: Get the version
28+
id: get_version
29+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
30+
- name: Create release on version tags
31+
uses: marvinpinto/action-automatic-releases@latest
32+
if: startsWith(github.ref, 'refs/tags/')
33+
with:
34+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
35+
prerelease: false
36+
files: cures-condec-vscode.vsix
37+
automatic_release_tag: ${{ steps.get_version.outputs.VERSION }}
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 CURES
3+
Copyright (c) 2021 Software Engineering Research Group, Heidelberg University
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Codecoverage](https://codecov.io/gh/cures-hub/cures-condec-vscode/branch/master/graph/badge.svg)](https://codecov.io/gh/cures-hub/cures-condec-vscode/branch/master)
66
[![GitHub contributors](https://img.shields.io/github/contributors/cures-hub/cures-condec-vscode.svg)](https://github.com/cures-hub/cures-condec-vscode/graphs/contributors)
77

8-
The CURES ConDec Visual Studio Code extension enables the user to explore decision knowledge from Visual Studio Code. Decision knowledge covers knowledge about decisions, the problems they address, solution proposals, their context, and justifications (rationale). The user can capture decision knowledge in code and commit messages and explore relevant knowledge for code.
8+
The ConDec Visual Studio Code extension enables the user to explore decision knowledge from Visual Studio Code. Decision knowledge covers knowledge about decisions, the problems they address, solution proposals, their context, and justifications (rationale). The user can capture decision knowledge in code and commit messages and explore relevant knowledge for code.
99

1010
## Installation
1111
### Prerequisites

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cures-condec-vscode",
33
"displayName": "Decision Documentation and Exploration",
44
"description": "Enables developers to continuously document and explore decision knowledge. Decision knowledge covers knowledge about decisions, the problems they address, solution proposals, their context, and justifications (rationale). The documented decision knowledge can be linked to Jira issues such as features, tasks to implement a feature, or bug reports.",
5-
"version": "0.0.1",
5+
"version": "0.0.2",
66
"publisher": "de-uhd-ifi-se",
77
"icon": "doc/cures.png",
88
"license": "MIT",
@@ -46,6 +46,7 @@
4646
"vscode-test": "^1.3.0"
4747
},
4848
"dependencies": {
49+
"npm": "^7.21.1",
4950
"path": "^0.12.7",
5051
"sinon": "^9.2.4"
5152
},

src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export function activate({ subscriptions }: vscode.ExtensionContext) {
1717
throw new Error('No workspace detected.');
1818
}
1919
vscode.env.openExternal(await getURIToFileInGraph(vscode.window.activeTextEditor.document.fileName));
20-
} catch(e) {
21-
vscode.window.showErrorMessage(e.message);
20+
} catch(e: any) {
21+
vscode.window.showErrorMessage(e);
2222
}
2323
}));
2424

@@ -98,4 +98,4 @@ function updateStatusBarItem(): void {
9898
showGraphInJiraStatusBarItem.show();
9999
}
100100
}
101-
}
101+
}

src/test/suite/extension.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ suite('Extension Test Suite', () => {
4949
await getURIToFileInGraph("src/main/condecTestClass.java");
5050
inputBoxStub.restore();
5151
assert(false, "The function terminated without throwing an exception");
52-
} catch(e) {
52+
} catch(e: any) {
5353
assert(/The Jira URL is not specified. Please provide the URL of the Jira server. You can always change the URL in the workspace settings./.test(e.message));
5454
inputBoxStub.restore();
5555
}
@@ -66,7 +66,7 @@ suite('Extension Test Suite', () => {
6666
await getURIToFileInGraph("src/main/condecTestClass.java");
6767
inputBoxStub.restore();
6868
assert(false, "The function terminated without throwing an exception");
69-
} catch(e) {
69+
} catch(e: any) {
7070
assert(/The Jira Project Key is not specified. Please provide the Project Key of the Jira project. You can always change the Project Key in the workspace settings./.test(e.message));
7171
inputBoxStub.restore();
7272
}

0 commit comments

Comments
 (0)