Skip to content

Commit

Permalink
Merge pull request #6 from gsoft-inc/develop
Browse files Browse the repository at this point in the history
Merge develop to main for release
  • Loading branch information
yohanb authored Jan 22, 2022
2 parents 61ae5ba + 4ca46b3 commit 5eb3fdf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Tests on PR

on:
pull_request:
branches:
- develop
- main

jobs:
build_package:
name: Build and Package Extension
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install NPM dependencies
run: npm ci

- name: Run tests
run: npm run test
11 changes: 3 additions & 8 deletions task/src/helmCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,11 @@ export default class helmCommand extends baseCommand {
if (installedPlugin) {
if (version == 'latest') {
return this.updatePlugin(pluginName, silent);
} else if (semver.neq(version, installedPlugin.version, true)) {
} else if (semver.valid(version) && semver.eq(version, installedPlugin.version, true)) {
return { code: 0, stdout: '', stderr: '', error: null } as IExecSyncResult;
} else {
this.unInstallPlugin(pluginName, silent);
return this.installPlugin(pluginUrl, version, silent);
} else {
return {
code: 0,
stdout: '',
stderr: '',
error: null
} as IExecSyncResult;
}
}

Expand Down
3 changes: 2 additions & 1 deletion task/tests/helmCommand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ describe('helmCommand', () => {
{ asked: '1.1.1', installed: '2.2.2' },
{ asked: '5.5.5', installed: '5.5.0' },
{ asked: 'v1.1.1', installed: 'v2.2.2' },
{ asked: 'v5.5.5', installed: 'v5.5.0' }
{ asked: 'v5.5.5', installed: 'v5.5.0' },
{ asked: '97f77494396694beb878128430205888a91d70b4', installed: 'v5.5.0' }
].forEach(function(version) {
it(`should reinstall if found ${version.installed} and asked version is ${version.asked}`, async () => {
const command = new helmCommand();
Expand Down

0 comments on commit 5eb3fdf

Please sign in to comment.