generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove custom script add only comments
- Loading branch information
Showing
22 changed files
with
504 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,11 @@ It automatically detects flows, executes them and produces md reports as comment | |
| Name | Type | Default | Description | | ||
|------------------------------| --------- | --------------------------- |----------------------------------------------------------------------------------------------------------- | | ||
| **`--commentId`** | `string` | `user flow summary report` | Id used to identify a comment in the PR (useful if multiple actions run user-flow for the same PR) | | ||
| **`--customScript`** | `string` | `undefined` | Custom way to execute user-flow (helpfule if the default way of execution is not given) | | ||
| **`--commentsOnly`** | `string` | `off` | Only collects results and creates a comment in the PR (helpful if the reports are generated over external logic) | | ||
| **`--rcPath`** | `string` | `./user-flowrc.json` | Path to `.user-flowrc.json`. e.g. `./user-flowrc.server.json` | | ||
| **`--verbose`** | `string` | `off` | Run with verbose logging (only 'on' and 'off' is possible) | | ||
| **`--dryRun`** | `string` | `off` | Run in `dryRun` mode (only 'on' and 'off' is possible) | | ||
| **`...`** | ... | ... | All other actions from the user-flow CLI are available | | ||
|
||
# Setup | ||
|
||
|
@@ -40,6 +41,35 @@ jobs: | |
uses: push-based/[email protected] | ||
``` | ||
You can use action inputs over the with property: | ||
```yml | ||
name: user-flow-ci | ||
on: | ||
pull_request: | ||
jobs: | ||
user-flow-integrated-in-ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Executing user-flow CLI | ||
# without any parameters the rcPath defaults to `.user-flowrc.json` | ||
uses: push-based/[email protected] | ||
with: | ||
commentId: test-e2e-first-run | ||
dryRun: off | ||
verbose: on | ||
url: https://google.com | ||
ufPath: ./user-flows | ||
outPath: ./packages/user-flow-gh-action-e2e/measures | ||
format: html,json | ||
rcPath: ./.user-flowrc.json | ||
``` | ||
# How to test the setup | ||
1. If you open a new PR in your repository you should see the runner execution your user-flow in the CI | ||
|
@@ -51,6 +81,34 @@ jobs: | |
<img width="676" alt="gh-ci-comment" title="Action created comment in PR" src="https://user-images.githubusercontent.com/10064416/216596391-35a041e2-9839-4cf5-b8c5-b55e93cb622e.PNG"> | ||
# How to use it with the nx-plugin and --affected | ||
If you use Nx as you tooling choice you should consider our [Nx plugin](https://github.com/push-based/user-flow/tree/main/packages/nx-plugin) for [user-flow](https://github.com/push-based/user-flow). | ||
Here is how you can combine it with the GitHub action: | ||
1. Use the action with commentsOnly. besides the outPath no other params are considered. | ||
```yml | ||
name: user-flow-ci | ||
on: | ||
pull_request: | ||
jobs: | ||
user-flow-integrated-in-ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Executing user-flow CLI | ||
uses: push-based/[email protected] | ||
with: | ||
verbose: on | ||
commentId: test-e2e-first-run | ||
commentsOnly: on | ||
``` | ||
--- | ||
made with ❤ by [push-based.io](https://www.push-based.io) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.