@testdriverai/mcp 7.9.151-test → 7.9.152-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/testdriver-ci-cd/SKILL.md +20 -34
- package/docs/v7/ci-cd.mdx +20 -34
- package/package.json +1 -1
|
@@ -6,37 +6,33 @@ description: Run TestDriver tests in CI/CD with parallel execution and cross-pla
|
|
|
6
6
|
|
|
7
7
|
TestDriver integrates seamlessly with popular CI providers, enabling automated end-to-end testing on every push and pull request.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Authentication
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
On **GitHub Actions, prefer OIDC** via the published `testdriverai/action` —
|
|
12
|
+
there's no `TD_API_KEY` secret to store, copy, or rotate. The action proves the
|
|
13
|
+
workflow is running inside your org and TestDriver exchanges that proof for your
|
|
14
|
+
team's key at run time. See the GitHub Actions tab below.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</Step>
|
|
17
|
-
<Step title="Add Secret to Your CI Provider">
|
|
18
|
-
Add `TD_API_KEY` as a secret environment variable in your CI provider's settings.
|
|
19
|
-
</Step>
|
|
20
|
-
</Steps>
|
|
16
|
+
For other CI providers (or self-hosted runners without OIDC), fall back to a
|
|
17
|
+
stored API key from [console.testdriver.ai/team](https://console.testdriver.ai/team),
|
|
18
|
+
added as a `TD_API_KEY` secret in your CI provider's settings.
|
|
21
19
|
|
|
22
20
|
<Note>
|
|
23
|
-
Never commit your API key directly in code. Always use your CI provider's secrets management.
|
|
21
|
+
Never commit your API key directly in code. Always use OIDC or your CI provider's secrets management.
|
|
24
22
|
</Note>
|
|
25
23
|
|
|
26
24
|
## CI Provider Examples
|
|
27
25
|
|
|
28
26
|
<Tabs>
|
|
29
27
|
<Tab title="GitHub Actions">
|
|
30
|
-
### Authenticate with OIDC (recommended)
|
|
28
|
+
### Authenticate with OIDC via `testdriverai/action` (recommended)
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
Use the published [`testdriverai/action`](https://github.com/testdriverai/action) — it mints the OIDC token, exchanges it for your team's API key, and exports `TD_API_KEY` for the steps that follow. **No `TD_API_KEY` secret to store or rotate.**
|
|
33
31
|
|
|
34
32
|
<Note>
|
|
35
|
-
|
|
33
|
+
One-time setup: authorize the [TestDriver GitHub App](https://console.testdriver.ai) for your org so the org → team binding exists. If your org authorized the App before OIDC support shipped, re-authorize once. If the App isn't authorized, the action fails with a console link (or falls back to the `api-key` secret if you provide one).
|
|
36
34
|
</Note>
|
|
37
35
|
|
|
38
|
-
Grant the job the `id-token: write` permission and exchange the OIDC token for your API key:
|
|
39
|
-
|
|
40
36
|
```yaml .github/workflows/testdriver.yml
|
|
41
37
|
name: TestDriver Tests
|
|
42
38
|
|
|
@@ -50,7 +46,7 @@ TestDriver requires an API key to authenticate with the TestDriver cloud. Store
|
|
|
50
46
|
test:
|
|
51
47
|
runs-on: ubuntu-latest
|
|
52
48
|
permissions:
|
|
53
|
-
id-token: write #
|
|
49
|
+
id-token: write # REQUIRED to mint an OIDC token
|
|
54
50
|
contents: read
|
|
55
51
|
|
|
56
52
|
steps:
|
|
@@ -63,28 +59,18 @@ TestDriver requires an API key to authenticate with the TestDriver cloud. Store
|
|
|
63
59
|
|
|
64
60
|
- run: npm ci
|
|
65
61
|
|
|
66
|
-
- name: Authenticate to TestDriver
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testdriver" | jq -r '.value')
|
|
71
|
-
API_KEY=$(curl -sS -X POST https://api.testdriver.ai/github/actions/auth \
|
|
72
|
-
-H "Content-Type: application/json" \
|
|
73
|
-
-d "{\"token\":\"$OIDC_TOKEN\"}" | jq -r '.apiKey')
|
|
74
|
-
echo "::add-mask::$API_KEY"
|
|
75
|
-
echo "TD_API_KEY=$API_KEY" >> "$GITHUB_ENV"
|
|
62
|
+
- name: Authenticate to TestDriver
|
|
63
|
+
uses: testdriverai/action@stable # pin @stable / @canary / @test to your SDK channel
|
|
64
|
+
with:
|
|
65
|
+
api-key: ${{ secrets.TD_API_KEY }} # optional fallback if OIDC isn't set up
|
|
76
66
|
|
|
77
67
|
- name: Run TestDriver tests
|
|
78
|
-
|
|
79
|
-
TD_API_KEY: ${{ env.TD_API_KEY }}
|
|
80
|
-
run: vitest --run
|
|
68
|
+
run: npx vitest run
|
|
81
69
|
```
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### Adding Secrets
|
|
71
|
+
### Stored-key fallback
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
Only if you can't use OIDC (e.g. self-hosted runners without an OIDC provider). Add the key as a secret and pass it via `env`:
|
|
88
74
|
|
|
89
75
|
1. Navigate to your GitHub repository
|
|
90
76
|
2. Go to **Settings** → **Secrets and variables** → **Actions**
|
package/docs/v7/ci-cd.mdx
CHANGED
|
@@ -7,37 +7,33 @@ icon: "code-branch"
|
|
|
7
7
|
|
|
8
8
|
TestDriver integrates seamlessly with popular CI providers, enabling automated end-to-end testing on every push and pull request.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Authentication
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
On **GitHub Actions, prefer OIDC** via the published `testdriverai/action` —
|
|
13
|
+
there's no `TD_API_KEY` secret to store, copy, or rotate. The action proves the
|
|
14
|
+
workflow is running inside your org and TestDriver exchanges that proof for your
|
|
15
|
+
team's key at run time. See the GitHub Actions tab below.
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</Step>
|
|
18
|
-
<Step title="Add Secret to Your CI Provider">
|
|
19
|
-
Add `TD_API_KEY` as a secret environment variable in your CI provider's settings.
|
|
20
|
-
</Step>
|
|
21
|
-
</Steps>
|
|
17
|
+
For other CI providers (or self-hosted runners without OIDC), fall back to a
|
|
18
|
+
stored API key from [console.testdriver.ai/team](https://console.testdriver.ai/team),
|
|
19
|
+
added as a `TD_API_KEY` secret in your CI provider's settings.
|
|
22
20
|
|
|
23
21
|
<Note>
|
|
24
|
-
Never commit your API key directly in code. Always use your CI provider's secrets management.
|
|
22
|
+
Never commit your API key directly in code. Always use OIDC or your CI provider's secrets management.
|
|
25
23
|
</Note>
|
|
26
24
|
|
|
27
25
|
## CI Provider Examples
|
|
28
26
|
|
|
29
27
|
<Tabs>
|
|
30
28
|
<Tab title="GitHub Actions">
|
|
31
|
-
### Authenticate with OIDC (recommended)
|
|
29
|
+
### Authenticate with OIDC via `testdriverai/action` (recommended)
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Use the published [`testdriverai/action`](https://github.com/testdriverai/action) — it mints the OIDC token, exchanges it for your team's API key, and exports `TD_API_KEY` for the steps that follow. **No `TD_API_KEY` secret to store or rotate.**
|
|
34
32
|
|
|
35
33
|
<Note>
|
|
36
|
-
|
|
34
|
+
One-time setup: authorize the [TestDriver GitHub App](https://console.testdriver.ai) for your org so the org → team binding exists. If your org authorized the App before OIDC support shipped, re-authorize once. If the App isn't authorized, the action fails with a console link (or falls back to the `api-key` secret if you provide one).
|
|
37
35
|
</Note>
|
|
38
36
|
|
|
39
|
-
Grant the job the `id-token: write` permission and exchange the OIDC token for your API key:
|
|
40
|
-
|
|
41
37
|
```yaml .github/workflows/testdriver.yml
|
|
42
38
|
name: TestDriver Tests
|
|
43
39
|
|
|
@@ -51,7 +47,7 @@ TestDriver requires an API key to authenticate with the TestDriver cloud. Store
|
|
|
51
47
|
test:
|
|
52
48
|
runs-on: ubuntu-latest
|
|
53
49
|
permissions:
|
|
54
|
-
id-token: write #
|
|
50
|
+
id-token: write # REQUIRED to mint an OIDC token
|
|
55
51
|
contents: read
|
|
56
52
|
|
|
57
53
|
steps:
|
|
@@ -64,28 +60,18 @@ TestDriver requires an API key to authenticate with the TestDriver cloud. Store
|
|
|
64
60
|
|
|
65
61
|
- run: npm ci
|
|
66
62
|
|
|
67
|
-
- name: Authenticate to TestDriver
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testdriver" | jq -r '.value')
|
|
72
|
-
API_KEY=$(curl -sS -X POST https://api.testdriver.ai/github/actions/auth \
|
|
73
|
-
-H "Content-Type: application/json" \
|
|
74
|
-
-d "{\"token\":\"$OIDC_TOKEN\"}" | jq -r '.apiKey')
|
|
75
|
-
echo "::add-mask::$API_KEY"
|
|
76
|
-
echo "TD_API_KEY=$API_KEY" >> "$GITHUB_ENV"
|
|
63
|
+
- name: Authenticate to TestDriver
|
|
64
|
+
uses: testdriverai/action@stable # pin @stable / @canary / @test to your SDK channel
|
|
65
|
+
with:
|
|
66
|
+
api-key: ${{ secrets.TD_API_KEY }} # optional fallback if OIDC isn't set up
|
|
77
67
|
|
|
78
68
|
- name: Run TestDriver tests
|
|
79
|
-
|
|
80
|
-
TD_API_KEY: ${{ env.TD_API_KEY }}
|
|
81
|
-
run: vitest --run
|
|
69
|
+
run: npx vitest run
|
|
82
70
|
```
|
|
83
71
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### Adding Secrets
|
|
72
|
+
### Stored-key fallback
|
|
87
73
|
|
|
88
|
-
|
|
74
|
+
Only if you can't use OIDC (e.g. self-hosted runners without an OIDC provider). Add the key as a secret and pass it via `env`:
|
|
89
75
|
|
|
90
76
|
1. Navigate to your GitHub repository
|
|
91
77
|
2. Go to **Settings** → **Secrets and variables** → **Actions**
|