testdriverai 7.2.56 → 7.2.58

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/.env.example CHANGED
@@ -1,2 +1,4 @@
1
1
  TD_API_KEY=
2
2
  TD_API_ROOT=
3
+
4
+ TWOCAPTCHA_API_KEY=
@@ -7,7 +7,7 @@ permissions:
7
7
  on:
8
8
  schedule:
9
9
  # Every day at midnight UTC
10
- - cron: '0 0 * * *'
10
+ - cron: "0 0 * * *"
11
11
  workflow_dispatch: # Allow manual trigger
12
12
 
13
13
  jobs:
@@ -15,6 +15,7 @@ jobs:
15
15
  uses: ./.github/workflows/windows-self-hosted.yaml
16
16
  secrets:
17
17
  TD_API_KEY: ${{ secrets.TD_API_KEY }}
18
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
18
19
  TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
19
20
  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
20
21
  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -23,31 +24,31 @@ jobs:
23
24
  needs: test-windows
24
25
  runs-on: ubuntu-latest
25
26
  if: always()
26
-
27
+
27
28
  steps:
28
- - name: Install Sentry CLI
29
- run: npm install -g @sentry/cli
30
-
31
- - name: Report to Sentry Cron
32
- run: |
33
- sentry-cli monitors run testdriver-windows-acceptance -- echo "Windows tests completed"
34
- env:
35
- SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
36
-
37
- - name: Download test results
38
- uses: actions/download-artifact@v4
39
- with:
40
- name: test-results-windows
41
-
42
- - name: Upload test results to Sentry Prevent
43
- if: ${{ !cancelled() }}
44
- uses: getsentry/prevent-action@v0
45
- with:
46
- token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
47
-
48
- - name: Publish Test Results
49
- uses: EnricoMi/publish-unit-test-result-action@v2
50
- if: always()
51
- with:
52
- files: test-report.junit.xml
53
- check_name: Test Results (Windows Scheduled)
29
+ - name: Install Sentry CLI
30
+ run: npm install -g @sentry/cli
31
+
32
+ - name: Report to Sentry Cron
33
+ run: |
34
+ sentry-cli monitors run testdriver-windows-acceptance -- echo "Windows tests completed"
35
+ env:
36
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
37
+
38
+ - name: Download test results
39
+ uses: actions/download-artifact@v4
40
+ with:
41
+ name: test-results-windows
42
+
43
+ - name: Upload test results to Sentry Prevent
44
+ if: ${{ !cancelled() }}
45
+ uses: getsentry/prevent-action@v0
46
+ with:
47
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
48
+
49
+ - name: Publish Test Results
50
+ uses: EnricoMi/publish-unit-test-result-action@v2
51
+ if: always()
52
+ with:
53
+ files: test-report.junit.xml
54
+ check_name: Test Results (Windows Scheduled)
@@ -1,12 +1,12 @@
1
1
  name: Acceptance Tests
2
2
  permissions:
3
- id-token: write
4
- contents: write
5
- pull-requests: write
6
- checks: write
3
+ id-token: write
4
+ contents: write
5
+ pull-requests: write
6
+ checks: write
7
7
  on:
8
8
  pull_request:
9
- branches: [ main ]
9
+ branches: [main]
10
10
 
11
11
  concurrency:
12
12
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -15,46 +15,48 @@ concurrency:
15
15
  jobs:
16
16
  test-linux:
17
17
  runs-on: ubuntu-latest
18
-
18
+
19
19
  steps:
20
- - uses: actions/checkout@v4
21
-
22
- - name: Setup Node.js
23
- uses: actions/setup-node@v4
24
- with:
25
- node-version: '20'
26
- cache: 'npm'
27
-
28
- - name: Install dependencies
29
- run: npm ci
30
-
31
- - name: Run Linux tests
32
- run: npx vitest run examples/*.test.mjs
33
- env:
34
- TD_API_KEY: ${{ secrets.TD_API_KEY }}
35
- TD_OS: linux
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: "20"
26
+ cache: "npm"
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
36
30
 
37
- - name: Upload test results to Sentry Prevent
38
- if: ${{ !cancelled() }}
39
- uses: getsentry/prevent-action@v0
40
- with:
41
- token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
31
+ - name: Run Linux tests
32
+ run: npx vitest run examples/*.test.mjs
33
+ env:
34
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
35
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
36
+ TD_OS: linux
42
37
 
43
- - name: Publish Test Results
44
- uses: EnricoMi/publish-unit-test-result-action@v2
45
- if: always()
46
- with:
47
- files: test-report.junit.xml
48
- comment_mode: always
49
- check_name: Test Results (Linux)
38
+ - name: Upload test results to Sentry Prevent
39
+ if: ${{ !cancelled() }}
40
+ uses: getsentry/prevent-action@v0
41
+ with:
42
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
43
+
44
+ - name: Publish Test Results
45
+ uses: EnricoMi/publish-unit-test-result-action@v2
46
+ if: always()
47
+ with:
48
+ files: test-report.junit.xml
49
+ comment_mode: always
50
+ check_name: Test Results (Linux)
50
51
 
51
52
  test-windows:
52
53
  if: contains(github.event.pull_request.labels.*.name, 'test-windows')
53
54
  uses: ./.github/workflows/windows-self-hosted.yaml
54
55
  with:
55
- test_pattern: 'examples/assert.test.mjs'
56
+ test_pattern: "examples/*.test.mjs"
56
57
  secrets:
57
58
  TD_API_KEY: ${{ secrets.TD_API_KEY }}
59
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
58
60
  TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
59
61
  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
60
62
  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -63,23 +65,23 @@ jobs:
63
65
  needs: test-windows
64
66
  runs-on: ubuntu-latest
65
67
  if: always() && contains(github.event.pull_request.labels.*.name, 'test-windows')
66
-
68
+
67
69
  steps:
68
- - name: Download test results
69
- uses: actions/download-artifact@v4
70
- with:
71
- name: test-results-windows
70
+ - name: Download test results
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ name: test-results-windows
72
74
 
73
- - name: Upload test results to Sentry Prevent
74
- if: ${{ !cancelled() }}
75
- uses: getsentry/prevent-action@v0
76
- with:
77
- token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
75
+ - name: Upload test results to Sentry Prevent
76
+ if: ${{ !cancelled() }}
77
+ uses: getsentry/prevent-action@v0
78
+ with:
79
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
78
80
 
79
- - name: Publish Test Results
80
- uses: EnricoMi/publish-unit-test-result-action@v2
81
- if: always()
82
- with:
83
- files: test-report.junit.xml
84
- comment_mode: always
85
- check_name: Test Results (Windows)
81
+ - name: Publish Test Results
82
+ uses: EnricoMi/publish-unit-test-result-action@v2
83
+ if: always()
84
+ with:
85
+ files: test-report.junit.xml
86
+ comment_mode: always
87
+ check_name: Test Results (Windows)
@@ -1,52 +1,68 @@
1
1
  name: Publish
2
2
  permissions:
3
- contents: write
4
- id-token: write # Required for OIDC
3
+ contents: write
4
+ id-token: write # Required for OIDC
5
5
  on:
6
6
  push:
7
- branches: [ main ]
7
+ branches: [main]
8
8
 
9
9
  jobs:
10
10
  publish:
11
11
  runs-on: ubuntu-latest
12
-
12
+
13
13
  steps:
14
- - uses: actions/checkout@v4
15
- with:
16
- fetch-depth: 0
17
- token: ${{ secrets.GITHUB_TOKEN }}
18
-
19
- - name: Setup Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: '20'
23
- registry-url: 'https://registry.npmjs.org/'
24
-
25
- - name: Configure Git
26
- run: |
27
- git config user.name "github-actions[bot]"
28
- git config user.email "github-actions[bot]@users.noreply.github.com"
29
-
30
- - name: Install dependencies
31
- run: npm ci
32
-
33
- - name: Bump version (patch)
34
- run: npm version patch --no-git-tag-version
35
-
36
- - name: Commit and push version bump
37
- run: |
38
- git add package.json package-lock.json
39
- git commit -m "chore: bump version to $(node -p "require('./package.json').version")"
40
- git push
41
-
42
- - name: Debug NPM Token
43
- run: |
44
- echo "NPM_TOKEN is set: ${{ secrets.NPM_TOKEN != '' }}"
45
- echo "NPM_TOKEN first 4 chars: ${NPM_TOKEN:0:4}..."
46
- env:
47
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48
-
49
- - name: Publish to npm
50
- run: npm publish --tag beta
51
- env:
52
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ token: ${{ secrets.GITHUB_TOKEN }}
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: "20"
23
+ registry-url: "https://registry.npmjs.org/"
24
+
25
+ - name: Configure Git
26
+ run: |
27
+ git config user.name "github-actions[bot]"
28
+ git config user.email "github-actions[bot]@users.noreply.github.com"
29
+
30
+ - name: Install dependencies
31
+ run: npm ci
32
+
33
+ - name: Bump version (patch)
34
+ run: npm version patch --no-git-tag-version
35
+
36
+ - name: Generate Changelog
37
+ run: |
38
+ npx conventional-changelog-cli -p angular -i CHANGELOG.md -s
39
+ git add CHANGELOG.md
40
+
41
+ - name: Commit and push version bump
42
+ run: |
43
+ git add package.json package-lock.json
44
+ VERSION=$(node -p "require('./package.json').version")
45
+ git commit -m "chore(release): ${VERSION}"
46
+ git tag "v${VERSION}"
47
+ git push origin main
48
+ git push origin "v${VERSION}"
49
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
50
+
51
+ - name: Create GitHub Release
52
+ uses: softprops/action-gh-release@v1
53
+ with:
54
+ tag_name: v${{ env.VERSION }}
55
+ generate_release_notes: true
56
+ prerelease: false
57
+
58
+ - name: Debug NPM Token
59
+ run: |
60
+ echo "NPM_TOKEN is set: ${{ secrets.NPM_TOKEN != '' }}"
61
+ echo "NPM_TOKEN first 4 chars: ${NPM_TOKEN:0:4}..."
62
+ env:
63
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64
+
65
+ - name: Publish to npm
66
+ run: npm publish --tag beta
67
+ env:
68
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}