New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support install-only workflow. #834
Changes from 7 commits
a0403c3
e8e7891
b7a50e3
43b01f2
4b05e24
a5ab666
bb28bd2
eecf166
400815c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
## 3.21.0 (2023-19-01) | ||
|
||
- feat: Add deletion of stack after destroy (remove flag) | ||
- feat: Add support for an `install` command, similar to | ||
[setup-pulumi](https://github.com/marketplace/actions/setup-pulumi) | ||
|
||
-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's with this trailing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this was added. Will fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Figured out where the |
||
|
||
## 3.20.0 (2022-11-10) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,53 @@ import { login } from '../login'; | |
|
||
const spy = jest.spyOn(pulumiCli, 'run'); | ||
|
||
const installConfig: Record<string, string> = { | ||
command: undefined, | ||
pulumiVersion: "^4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likely because the test wanted to verify with a non-default value. |
||
}; | ||
|
||
describe('Config without a provided command', () => { | ||
let oldWorkspace = ''; | ||
beforeEach(() => { | ||
spy.mockClear(); | ||
jest.resetModules(); | ||
// Save, then restore the current env var for GITHUB_WORKSPACE | ||
oldWorkspace = process.env.GITHUB_WORKSPACE; | ||
process.env.GITHUB_WORKSPACE = 'n/a'; | ||
}); | ||
afterEach(() => { | ||
process.env.GITHUB_WORKSPACE = oldWorkspace; | ||
}); | ||
|
||
it('should not be validated by makeConfig', async () => { | ||
jest.mock('@actions/core', () => ({ | ||
getInput: jest.fn((name: string) => { | ||
return installConfig[name]; | ||
}), | ||
info: jest.fn(), | ||
})); | ||
jest.mock('@actions/github', () => ({ | ||
context: {}, | ||
})); | ||
const { makeConfig } = require('../config'); | ||
await expect(makeConfig()) | ||
.rejects | ||
.toThrow(); | ||
}); | ||
|
||
it('should be validated by makeInstallationConfig', async() => { | ||
jest.mock('@actions/core', () => ({ | ||
getInput: jest.fn((name: string) => { | ||
return installConfig[name]; | ||
}), | ||
info: jest.fn(), | ||
})); | ||
const { makeInstallationConfig } = require('../config'); | ||
const conf = await makeInstallationConfig() | ||
expect(conf).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe('main.login', () => { | ||
beforeEach(() => { | ||
spy.mockClear(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this listed under 3.2.1 and not HEAD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, probably because there was a release since this change was made and git merge decided to put it in the old position. Good catch.