apify-test-tools 0.10.2-beta.15 → 0.10.2-beta.16
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.
|
@@ -23,6 +23,7 @@ name: 'Platform tests: Claude failure investigation and fix'
|
|
|
23
23
|
# uses: apify/apify-test-tools/.github/workflows/public_platform-tests.yaml@workflows-v0
|
|
24
24
|
# with:
|
|
25
25
|
# subtest: core
|
|
26
|
+
# report-slack-channel: '#notif-my-repo'
|
|
26
27
|
# secrets:
|
|
27
28
|
# TESTER_APIFY_TOKEN: ${{ secrets.TESTER_APIFY_TOKEN }}
|
|
28
29
|
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
@@ -13,7 +13,7 @@ on:
|
|
|
13
13
|
type: string
|
|
14
14
|
default: ''
|
|
15
15
|
required: false
|
|
16
|
-
#
|
|
16
|
+
# Slack channel for failed tests. Empty skips Slack.
|
|
17
17
|
report-slack-channel:
|
|
18
18
|
type: string
|
|
19
19
|
default: ''
|
|
@@ -69,8 +69,8 @@ jobs:
|
|
|
69
69
|
| apify-test-tools test ./test/platform/${{ inputs.test-files-glob || inputs.subtest }} \
|
|
70
70
|
--reporter github-actions --vitest-output-file ./test-output.json > test-report.json
|
|
71
71
|
|
|
72
|
-
# Posts only when the tests failed, but checks the Slack token on every run
|
|
73
|
-
# did, also after a failure, but not when the token check stopped the job before them.
|
|
72
|
+
# Posts only when the tests failed, but checks the Slack token on every run that has a channel. Runs
|
|
73
|
+
# whenever the tests did, also after a failure, but not when the token check stopped the job before them.
|
|
74
74
|
- name: Notify
|
|
75
75
|
if: ${{ !cancelled() && steps.test.outcome != 'skipped' }}
|
|
76
76
|
env:
|
|
@@ -78,6 +78,8 @@ jobs:
|
|
|
78
78
|
# Passed through the environment, so a quote in the workflow name can't break the command
|
|
79
79
|
WORKFLOW_NAME: ${{ github.workflow }}
|
|
80
80
|
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
81
|
+
# Empty makes notify skip Slack
|
|
82
|
+
SLACK_CHANNEL: ${{ inputs.report-slack-channel }}
|
|
81
83
|
run: |
|
|
82
84
|
# Empty when `test` itself failed before running vitest, its error is in the Test step
|
|
83
85
|
if [ ! -s test-report.json ]; then
|
|
@@ -85,7 +87,7 @@ jobs:
|
|
|
85
87
|
exit 0
|
|
86
88
|
fi
|
|
87
89
|
apify-test-tools notify \
|
|
88
|
-
--slack-channel "$
|
|
90
|
+
--slack-channel "$SLACK_CHANNEL" \
|
|
89
91
|
--title "$WORKFLOW_NAME" \
|
|
90
92
|
--job-url "$JOB_URL" \
|
|
91
93
|
< test-report.json
|
|
@@ -3,7 +3,7 @@ name: Build latest and report to slack
|
|
|
3
3
|
on:
|
|
4
4
|
workflow_call:
|
|
5
5
|
inputs:
|
|
6
|
-
#
|
|
6
|
+
# Slack channel for release announcements. Empty skips Slack.
|
|
7
7
|
report-slack-channel:
|
|
8
8
|
type: string
|
|
9
9
|
default: ''
|
|
@@ -65,13 +65,14 @@ jobs:
|
|
|
65
65
|
| node "${{ steps.setup.outputs.scripts-path }}/run-with-apify-tokens.mjs" \
|
|
66
66
|
apify-test-tools build --version-number default
|
|
67
67
|
|
|
68
|
-
# Skips the announcement when the push brought no new commits
|
|
68
|
+
# Skips the announcement when the push brought no new commits, or when no channel is set
|
|
69
69
|
- name: Announce the release on Slack
|
|
70
70
|
env:
|
|
71
71
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
72
|
+
SLACK_CHANNEL: ${{ inputs.report-slack-channel }}
|
|
72
73
|
run: |
|
|
73
74
|
apify-test-tools notify \
|
|
74
|
-
--slack-channel "$
|
|
75
|
+
--slack-channel "$SLACK_CHANNEL" \
|
|
75
76
|
< affected.json
|
|
76
77
|
|
|
77
78
|
- name: Delete old builds
|
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
|
|
|
17
17
|
- [**breaking**] Require env vars of test versions in sync with the default version ([#217](https://github.com/apify/apify-test-tools/pull/217)) ([a2481dd](https://github.com/apify/apify-test-tools/commit/a2481ddf09004308cb54e49b783c8b21a25dcbe4)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
18
18
|
- Add impact & priority assessment to claude investigator ([#216](https://github.com/apify/apify-test-tools/pull/216)) ([fd16622](https://github.com/apify/apify-test-tools/commit/fd16622b910ec6e9b5515ea0bd26b0a41c22bd23)) by [@foxt451](https://github.com/foxt451), closes [#208](https://github.com/apify/apify-test-tools/issues/208)
|
|
19
19
|
- Stale issue/pr workflow ([#236](https://github.com/apify/apify-test-tools/pull/236)) ([aff1fa7](https://github.com/apify/apify-test-tools/commit/aff1fa778adb846a60fdacdd26aa13a71729613d)) by [@JuanGalilea](https://github.com/JuanGalilea), closes [#35](https://github.com/apify/apify-test-tools/issues/35)
|
|
20
|
+
- **workflows:** [**breaking**] Skip Slack when report-slack-channel is empty ([#238](https://github.com/apify/apify-test-tools/pull/238)) ([9a15b56](https://github.com/apify/apify-test-tools/commit/9a15b56de9ca42fb5ea753dc478116f9cd9c2c94)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
20
21
|
|
|
21
22
|
### 🐛 Bug Fixes
|
|
22
23
|
|
package/docs/workflows.md
CHANGED
|
@@ -107,9 +107,9 @@ Releases the Actors a push changed. Skipped when the head commit message contain
|
|
|
107
107
|
4. `delete-old-builds` deletes old builds of every Actor in the config (see
|
|
108
108
|
[`delete-old-builds`](cli.md#deleting-old-builds-delete-old-builds)).
|
|
109
109
|
|
|
110
|
-
| Input | Type | Default | Description
|
|
111
|
-
| ---------------------- | ------ | ------- |
|
|
112
|
-
| `report-slack-channel` | string | `''` | Slack channel for the report. Empty
|
|
110
|
+
| Input | Type | Default | Description |
|
|
111
|
+
| ---------------------- | ------ | ------- | ----------------------------------------------- |
|
|
112
|
+
| `report-slack-channel` | string | `''` | Slack channel for the report. Empty skips Slack |
|
|
113
113
|
|
|
114
114
|
Secrets: `SLACK_BOT_TOKEN`, the Actor tokens in `CONFIG_SECRETS`, and optionally `NPM_TOKEN`.
|
|
115
115
|
|
|
@@ -126,6 +126,8 @@ on:
|
|
|
126
126
|
jobs:
|
|
127
127
|
buildLatest:
|
|
128
128
|
uses: apify/apify-test-tools/.github/workflows/public_push-build-latest.yaml@workflows-v0
|
|
129
|
+
with:
|
|
130
|
+
report-slack-channel: '#notif-my-repo'
|
|
129
131
|
secrets:
|
|
130
132
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
131
133
|
# One entry per secret apify-test-tools.config.json names, today each `tokenEnvVar`
|
|
@@ -148,7 +150,7 @@ vitest's own JSON report are uploaded as the `vitest-results` artifact. Runs onl
|
|
|
148
150
|
| ---------------------- | ------ | ------- | ---------------------------------------------------------------------------- |
|
|
149
151
|
| `test-files-glob` | string | `''` | Which tests to run, relative to `test/platform`. Empty runs everything in it |
|
|
150
152
|
| `subtest` | string | `''` | Deprecated, use `test-files-glob` |
|
|
151
|
-
| `report-slack-channel` | string | `''` | Slack channel for the results. Empty
|
|
153
|
+
| `report-slack-channel` | string | `''` | Slack channel for the results. Empty skips Slack |
|
|
152
154
|
|
|
153
155
|
Secrets: `TESTER_APIFY_TOKEN` (required), `SLACK_BOT_TOKEN`, and optionally `NPM_TOKEN`.
|
|
154
156
|
|
|
@@ -166,6 +168,8 @@ on:
|
|
|
166
168
|
jobs:
|
|
167
169
|
platformTestsDaily:
|
|
168
170
|
uses: apify/apify-test-tools/.github/workflows/public_platform-tests.yaml@workflows-v0
|
|
171
|
+
with:
|
|
172
|
+
report-slack-channel: '#notif-my-repo'
|
|
169
173
|
secrets:
|
|
170
174
|
TESTER_APIFY_TOKEN: ${{ secrets.TESTER_APIFY_TOKEN }}
|
|
171
175
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
@@ -187,6 +191,7 @@ jobs:
|
|
|
187
191
|
uses: apify/apify-test-tools/.github/workflows/public_platform-tests.yaml@workflows-v0
|
|
188
192
|
with:
|
|
189
193
|
test-files-glob: hourly
|
|
194
|
+
report-slack-channel: '#notif-my-repo'
|
|
190
195
|
secrets:
|
|
191
196
|
TESTER_APIFY_TOKEN: ${{ secrets.TESTER_APIFY_TOKEN }}
|
|
192
197
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
@@ -286,6 +291,7 @@ jobs:
|
|
|
286
291
|
uses: apify/apify-test-tools/.github/workflows/public_platform-tests.yaml@workflows-v0
|
|
287
292
|
with:
|
|
288
293
|
test-files-glob: hourly
|
|
294
|
+
report-slack-channel: '#notif-my-repo'
|
|
289
295
|
secrets:
|
|
290
296
|
TESTER_APIFY_TOKEN: ${{ secrets.TESTER_APIFY_TOKEN }}
|
|
291
297
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|