f6d669c9e7
11524: test: use T.TempDir to create temporary test directory r=Frassle a=Juneezee # Description A testing cleanup. This pull request replaces `ioutil.TempDir` with `t.TempDir`. We can use the `T.TempDir` function from the `testing` package to create temporary directory. The directory created by `T.TempDir` is automatically removed when the test and all its subtests complete. Reference: https://pkg.go.dev/testing#T.TempDir ```go func TestFoo(t *testing.T) { // before tmpDir, err := ioutil.TempDir("", "") assert.NoError(t, err) defer os.RemoveAll(tmpDir) // now tmpDir := t.TempDir() } ``` ## Checklist - [ ] ~~I have added tests that prove my fix is effective or that my feature works~~: Tests refactoring only, no new features added. <!--- User-facing changes require a CHANGELOG entry. --> - [ ] ~~I have updated the [CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md) file with my change~~: This PR is a non user-facing change. <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] ~~Yes, there are changes in this PR that warrants bumping the Pulumi Service API version~~: N/A <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 11586: ci: Fix extraneous alpha draft releases r=AaronFriel a=AaronFriel The [PR workflow to update Pulumi YAML to 1.0.4](https://github.com/pulumi/pulumi/actions/runs/3642973677) shows that it created a draft release, and this has been the case for all contributors' PRs. This fixes the extra alpha releases created as a result of pull requests. The job "prepare-release" shouldn't run unless the ci/test label is set, indicating an intent to evaluate the full CI pipeline. Co-authored-by: Eng Zer Jun <engzerjun@gmail.com> Co-authored-by: Aaron Friel <mayreply@aaronfriel.com> |
||
---|---|---|
.. | ||
asset | ||
automation | ||
cmd | ||
dist | ||
dynamic | ||
iterable | ||
log | ||
npm | ||
proto | ||
provider | ||
queryable | ||
runtime | ||
tests | ||
tests_with_mocks | ||
.eslintrc.js | ||
.gitignore | ||
Makefile | ||
README.md | ||
config.ts | ||
errors.ts | ||
index.ts | ||
invoke.ts | ||
metadata.ts | ||
output.ts | ||
package.json | ||
resource.ts | ||
stackReference.ts | ||
tsconfig.json | ||
tsutils.ts | ||
utils.ts | ||
version.ts | ||
yarn.lock |
README.md
Pulumi Node.js SDK
The Pulumi Node.js SDK lets you write cloud programs in JavaScript.
Installation
Using npm:
$ npm install --save @pulumi/pulumi
Using yarn:
$ yarn add @pulumi/pulumi
This SDK is meant for use with the Pulumi CLI. Visit Pulumi's Download & Install to install the CLI.
Building and Testing
For anybody who wants to build from source, here is how you do it.
Prerequisites
This SDK uses Node.js and we support any of the Current, Active and Maintenance LTS versions. We support both NPM and Yarn for package management.
At the moment, we only support building on macOS and Linux, where standard GNU tools like make
are available.
Make Targets
To build the SDK, simply run make
from the root directory (where this README
lives, at sdk/nodejs/
from the repo's
root). This will build the code, run tests, and install the package and its supporting artifacts.
At the moment, for local development, we install everything into $HOME/.dev-pulumi
. You will want this on your $PATH
.
The tests will verify that everything works, but feel free to try running pulumi preview
and/or pulumi up
from
the examples/minimal/
directory. Remember to run tsc
first, since pulumi
expects JavaScript, not TypeScript.