apify-test-tools 0.10.2-beta.1 → 0.10.2-beta.2
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/.gitattributes +2 -0
- package/.github/actions/checkout-restore-dependencies/action.yaml +13 -29
- package/.github/cli/apify-test-tools.mjs +362 -0
- package/.github/scripts/run-with-apify-tokens.mjs +2 -2
- package/.github/workflows/_check_code.yaml +25 -0
- package/.github/workflows/_move_major_tag.yaml +3 -81
- package/.github/workflows/_tests.yaml +34 -0
- package/.github/workflows/_update_release_metadata.yaml +0 -12
- package/.github/workflows/manual_move_major_tag.yaml +3 -3
- package/.github/workflows/manual_release_stable.yaml +3 -13
- package/.github/workflows/on_master.yaml +9 -5
- package/.github/workflows/on_pull_request.yaml +3 -48
- package/.github/workflows/public_platform-tests.yaml +1 -1
- package/.github/workflows/public_pr-build-test.yaml +2 -2
- package/.github/workflows/public_push-build-latest.yaml +2 -2
- package/.husky/pre-commit +5 -0
- package/.prettierignore +3 -0
- package/CHANGELOG.md +4 -0
- package/CONTRIBUTING.md +8 -18
- package/README.md +39 -44
- package/bin/build-from-local.ts +47 -13
- package/bin/build.ts +35 -19
- package/bin/main.ts +20 -5
- package/bin/slack.ts +28 -6
- package/bin/test-report.ts +6 -9
- package/bin/types.ts +9 -0
- package/dist/bin/build-from-local.d.ts +10 -2
- package/dist/bin/build-from-local.d.ts.map +1 -1
- package/dist/bin/build-from-local.js +29 -11
- package/dist/bin/build-from-local.js.map +1 -1
- package/dist/bin/build.d.ts +15 -5
- package/dist/bin/build.d.ts.map +1 -1
- package/dist/bin/build.js +24 -15
- package/dist/bin/build.js.map +1 -1
- package/dist/bin/main.js +18 -4
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/slack.d.ts +8 -1
- package/dist/bin/slack.d.ts.map +1 -1
- package/dist/bin/slack.js +26 -5
- package/dist/bin/slack.js.map +1 -1
- package/dist/bin/test-report.d.ts.map +1 -1
- package/dist/bin/test-report.js +6 -8
- package/dist/bin/test-report.js.map +1 -1
- package/dist/bin/types.d.ts +8 -0
- package/dist/bin/types.d.ts.map +1 -1
- package/dist/test/bundle/cli-bundle.test.d.ts +2 -0
- package/dist/test/bundle/cli-bundle.test.d.ts.map +1 -0
- package/dist/test/bundle/cli-bundle.test.js +162 -0
- package/dist/test/bundle/cli-bundle.test.js.map +1 -0
- package/dist/test/e2e/cli-bundle.e2e.test.d.ts +2 -0
- package/dist/test/e2e/cli-bundle.e2e.test.d.ts.map +1 -0
- package/dist/test/e2e/cli-bundle.e2e.test.js +172 -0
- package/dist/test/e2e/cli-bundle.e2e.test.js.map +1 -0
- package/dist/test/unit/bin/build-from-local.test.js +53 -1
- package/dist/test/unit/bin/build-from-local.test.js.map +1 -1
- package/dist/test/unit/bin/build.test.js +113 -3
- package/dist/test/unit/bin/build.test.js.map +1 -1
- package/dist/test/unit/bin/slack.test.d.ts +2 -0
- package/dist/test/unit/bin/slack.test.d.ts.map +1 -0
- package/dist/test/unit/bin/slack.test.js +54 -0
- package/dist/test/unit/bin/slack.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -3
- package/test/bundle/cli-bundle.test.ts +192 -0
- package/test/e2e/cli-bundle.e2e.test.ts +237 -0
- package/test/unit/bin/build-from-local.test.ts +55 -0
- package/test/unit/bin/build.test.ts +135 -3
- package/test/unit/bin/slack.test.ts +65 -0
- package/.github/scripts/check-package-version-bump.mjs +0 -74
- package/.github/workflows-package-version +0 -1
package/.gitattributes
ADDED
|
@@ -19,8 +19,8 @@ outputs:
|
|
|
19
19
|
|
|
20
20
|
# Sets common steps and ensure we use cached node_modules
|
|
21
21
|
# To test a change here, repoint the `uses:` refs in the reusable workflows at your branch, and
|
|
22
|
-
# change them back before merging.
|
|
23
|
-
#
|
|
22
|
+
# change them back before merging. Consumers track the `workflows-v0` tag, which moves on every
|
|
23
|
+
# push to master.
|
|
24
24
|
runs:
|
|
25
25
|
using: 'composite'
|
|
26
26
|
steps:
|
|
@@ -64,32 +64,16 @@ runs:
|
|
|
64
64
|
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
|
|
65
65
|
run: npm ci
|
|
66
66
|
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
# Needs the npm token too: a repo whose .npmrc routes all traffic through a private
|
|
73
|
-
# registry has to authenticate even for public packages.
|
|
67
|
+
# The CLI the workflows call ships with this action as one bundled file (npm run bundle), so
|
|
68
|
+
# nothing is installed for it. The repo's node_modules stays exactly what package-lock.json
|
|
69
|
+
# says, and its tests import the lib from the version they locked.
|
|
70
|
+
# Steps call `apify-test-tools` without npx: npx would pick the repo's own copy in node_modules/.bin first.
|
|
71
|
+
- name: Put apify-test-tools CLI on PATH
|
|
74
72
|
shell: bash
|
|
75
|
-
env:
|
|
76
|
-
NPM_TOKEN: ${{ inputs.npm-token }}
|
|
77
|
-
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
|
|
78
73
|
run: |
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# The workflows name the exact package version they ship with, so a tag is a complete
|
|
86
|
-
# statement: these workflows and this library. A frozen major tag then keeps
|
|
87
|
-
# installing what it was tested against however far the package moves on. A `>=`
|
|
88
|
-
# floor could not do that — being open-ended, it resolves to the newest release
|
|
89
|
-
# forever, so freezing the tag would freeze the workflow files but not their
|
|
90
|
-
# dependency. The stable release writes this file, so it always names a published
|
|
91
|
-
# version; the release that publishes X is the commit that pins X.
|
|
92
|
-
pinned_version=$(cat "${{ github.action_path }}/../../workflows-package-version")
|
|
93
|
-
echo "Installing apify-test-tools@$pinned_version (pinned by these workflows)"
|
|
94
|
-
npm install "apify-test-tools@$pinned_version" --no-save --audit=false --no-fund;
|
|
95
|
-
fi
|
|
74
|
+
bundle="$(cd "${{ github.action_path }}/../../cli" && pwd)/apify-test-tools.mjs"
|
|
75
|
+
bin_dir="$RUNNER_TEMP/apify-test-tools-bin"
|
|
76
|
+
mkdir -p "$bin_dir"
|
|
77
|
+
printf '#!/bin/sh\nexec node --no-warnings "%s" "$@"\n' "$bundle" > "$bin_dir/apify-test-tools"
|
|
78
|
+
chmod +x "$bin_dir/apify-test-tools"
|
|
79
|
+
echo "$bin_dir" >> "$GITHUB_PATH"
|