This repository maintains a GitHub action to run @push-based/user-flow in a workflow. It automatically detects flows, executes them and produces md reports as comments in your PR.
Inputs: | 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) | |
--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 |
user-flow-ci.yml
in ./.github/workflows
.This can be done by using the init
:
npx @push-based/user-flow init --generateGhWorkflow
user-flow-ci.yml
file should have the following content: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/user-flow-gh-action@v0.1.0
You can use action inputs over the with property:
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/user-flow-gh-action@v0.1.0
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
If you use Nx as you tooling choice you should consider our Nx plugin for user-flow.
Here is how you can combine it with the GitHub action:
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/user-flow-gh-action@v0.1.0
with:
verbose: on
commentId: test-e2e-first-run
commentsOnly: on
made with ❤ by push-based.io