Repository navigation
What's Changed
🌟 New features
- Rename npm package from
@pshevche/act-test-runnertoact-test-runnerby @pshevche in #208 - Capture details about steps the job ran by @pshevche in #200
- Capture matrix values the job ran with by @pshevche in #197
- Support listening to the act output stream by @pshevche in #175
- Support supplying a custom act executable by @pshevche in #163
- Support aborting a running act invocation via
AbortSignalby @pshevche in #195
🛠️ Fixes
- Remove
actcontainers upon workflow failure by @pshevche in #167 - Make
withEnvand similar builder methods override values instead of merging them by @pshevche in #199 - Reject additional arguments that are managed via explicit runner builder methods by @pshevche in #166
- Guard against reusing an
ActRunnerinstance across multiplerun()calls by @pshevche in #187 - Reject clearly when the act process fails to launch by @pshevche in #186
- Remove noise log around creating temporary files by @pshevche in #154
👜 Misc
- [Dependencies] Move
@octokit/webhooks-typestopeerDependenciesby @smashercosmo in #157 - [Docs] Move detailed usage docs from
READMEto the wiki by @pshevche in #202
❗ BREAKING CHANGES
Package rename
The npm package name changed from @pshevche/act-test-runner to the unscoped act-test-runner. I realized late that the scoped package name was not the right decision right from the start, and I am using this major release to revisit that decision. To simplify the migration, the 2.0.0 release will be available under both names. To migrate, update your package.json to pull in the new package and reference the new package name in your imports:
// before
import { ActRunner, ActExecStatus } from '@pshevche/act-test-runner';
// after
import { ActRunner, ActExecStatus } from 'act-test-runner';Public API changes
Personal note: In this release, the public act-test-runner API received a major revamp. The previous version was heavily influenced by my Java background and often felt clunky in the context of Typescript. As I learned more about how the library is used and idiomatic TS constructs, I decided to revisit it for the 2.0.0 release. See the list below for all changes made and how to migrate. Enjoy! 😅
ActRunner#withWorkflowBodyandActRunner#withWorkflowFileare merged into a single `ActRunner#withWorkflow
// before
.withWorkflowFile(path)
.withWorkflowBody(body)
// after
.withWorkflow({ file: path })
.withWorkflow({ body: body })- Workflow input setters, such as
ActRunner#withEnvFileandActRunner#withEnvValues, are merged into a single setter method
// before
.withEnvFile(path)
.withEnvValues({ GREETING: 'Hello' })
// after
.withEnv({ file: path })
.withEnv({ values: { GREETING: 'Hello' } })ActRunner#withCacheServerandActRunner#withArtifactServertake an options object instead of optional positional arguments
// before
.withCacheServer(path, host, port)
// after
.withCacheServer({ path, host, port })ActWorkflowExecResult.jobsis now aRecordinstead ofMapwithjob(name)accessor
// before
result.jobs.size
result.job('my_job')
// after
Object.keys(result.jobs).length
result.jobs['my_job']Full Changelog: v1.1.0...v2.0.0