Skip to content

Commit 319813c

Browse files
authored
feat: Add discovery output flags (#107)
* feat: Add discovery output flags - To make it clear these are for the pwc-p discovery subcommand * chore: fix test env variable * chore: restore previous format
1 parent 560cffc commit 319813c

6 files changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Node.js
3131
uses: actions/setup-node@v6
3232
with:
33-
node-version: '18'
33+
node-version: '22'
3434

3535
- name: Print inputs for debugging (Sharding)
3636
env:
@@ -74,7 +74,7 @@ jobs:
7474
- name: Set up Node.js
7575
uses: actions/setup-node@v6
7676
with:
77-
node-version: '20'
77+
node-version: '22'
7878

7979
- name: Print inputs for debugging (Or8n)
8080
env:
@@ -96,5 +96,8 @@ jobs:
9696
- name: Verify Action Output (Or8n)
9797
env:
9898
EXTRA_FLAGS: ${{ steps.or8n_action.outputs.extra-pw-flags }}
99+
EXTRA_DISCOVERY_FLAGS:
100+
${{ steps.or8n_action.outputs.extra-discovery-flags }}
99101
run: |
100102
echo "Extra Playwright Flags: $EXTRA_FLAGS"
103+
echo "Extra Discovery Flags: $EXTRA_DISCOVERY_FLAGS"

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,17 @@ skipped**.
5050

5151
On **re-run attempts** (`GITHUB_RUN_ATTEMPT` > 1), the main step runs
5252
`npx currents api get-run` to fetch the previous run and, when successful, sets
53-
`extra-pw-flags` to `--last-failed`. The workflow should define
53+
`extra-discovery-flags` to `--last-failed`. The workflow should define
5454
**`CURRENTS_API_KEY`**, **`CURRENTS_PROJECT_ID`** (and related environment
5555
variables as in the docs), and set **`or8n: true`** (or `use-api: true`) as
5656
shown in the [orchestration section][or8n-section] of the documentation.
5757

5858
## Outputs
5959

60-
| Name | Description |
61-
| ---------------- | ----------------------------------------------- |
62-
| `extra-pw-flags` | Flags to append to the Playwright test command. |
60+
| Name | Description |
61+
| ----------------------- | ------------------------------------------------ |
62+
| `extra-pw-flags` | Flags to append to the Playwright test command. |
63+
| `extra-discovery-flags` | Flags to append to the `pwc-p discover` command. |
6364

6465
If restoration fails, the output may be empty; the workflow can still run tests
6566
normally.

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ inputs:
6060
outputs:
6161
extra-pw-flags:
6262
description: "Extra flags to pass to Playwright's test runner"
63+
extra-discovery-flags:
64+
description: 'Extra flags to pass to pwc-p discover'
6365

6466
runs:
6567
using: node24

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ async function or8n(inputs: ActionInputs): Promise<void> {
135135

136136
if (exitCode === 0) {
137137
core.setOutput('extra-pw-flags', '--last-failed')
138+
core.setOutput('extra-discovery-flags', '--last-failed')
138139
}
139140
}
140141
}

0 commit comments

Comments
 (0)