Skip to content

Commit

Permalink
feat!: Update action to install our new go cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hnrkndrssn authored Dec 6, 2022
1 parent b219622 commit 5eb509a
Show file tree
Hide file tree
Showing 8 changed files with 882 additions and 1,729 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
schedule:
- cron: '17 23 * * 3'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
analyze:
name: Analyze
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
with:
version: latest

- run: octo version
- run: octopus version
19 changes: 6 additions & 13 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,25 @@ describe('installer', () => {
test('fails to acquire a version of Octopus CLI', () => {
expect.assertions(1)
return installOctopusCli('0.0.0').catch(e => {
expect(<Error>e.message).toContain('Octopus CLI version not found')
expect(<Error>e.message).toContain('Failed to resolve endpoint URL to download:')
})
}, 100000)

test('fails to acquire a version of Octopus CLI', () => {
expect.assertions(1)
return installOctopusCli('0.0.0').catch(e => {
expect(<Error>e.message).toContain('Octopus CLI version not found')
})
}, 100000)

test('acquires version 8.* of Octopus CLI', () => {
return installOctopusCli('8.*').then(data => {
expect(data).toContain(path.sep + 'octo' + path.sep)
test('acquires version 0.5.* of Octopus CLI', () => {
return installOctopusCli('0.5.*').then(data => {
expect(data).toContain(path.sep + 'octopus' + path.sep)
})
}, 100000)

test('acquires latest version of Octopus CLI', () => {
return installOctopusCli('latest').then(data => {
expect(data).toContain(path.sep + 'octo' + path.sep)
expect(data).toContain(path.sep + 'octopus' + path.sep)
})
}, 100000)

test('acquires latest version of Octopus CLI', () => {
return installOctopusCli('*').then(data => {
expect(data).toContain(path.sep + 'octo' + path.sep)
expect(data).toContain(path.sep + 'octopus' + path.sep)
})
}, 100000)
})
Loading

0 comments on commit 5eb509a

Please sign in to comment.