Skip to content

Commit 63c748c

Browse files
authored
test: add e2e tests (#1077)
- runCli() helper with auto-detected dist/npx/global modes + 6 help tests - test-actor helper + basic-actor fixture + 8 local tests (invalid-config, actor-run-input) - 8 builds tests with auth, platform push, and remote cleanup - e2e.yaml CI workflow — triggers after beta publish, daily, manual dispatch with version override - Deleted cucumber infrastructure closes #1065
1 parent f158e38 commit 63c748c

23 files changed

Lines changed: 575 additions & 2176 deletions

.github/workflows/cucumber.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/e2e.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: E2E Tests
2+
3+
on:
4+
# Run after a pre-release is published to npm
5+
workflow_run:
6+
workflows: ["Create a pre-release"]
7+
types: [completed]
8+
branches: [master]
9+
10+
# TODO: Remove after validating the workflow works
11+
pull_request:
12+
branches: [master]
13+
14+
# Manual trigger — pick any branch in the Actions UI to test that branch's build.
15+
workflow_dispatch:
16+
17+
# Daily fallback at 06:00 UTC
18+
schedule:
19+
- cron: "0 6 * * *"
20+
21+
concurrency:
22+
group: e2e-${{ github.event_name }}-${{ github.ref }}
23+
cancel-in-progress: false
24+
25+
jobs:
26+
e2e:
27+
if: >
28+
startsWith(github.repository, 'apify/') &&
29+
(github.event_name != 'workflow_run' ||
30+
github.event.workflow_run.conclusion == 'success')
31+
32+
name: E2E Tests (${{ matrix.os }})
33+
timeout-minutes: 30
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os: [ubuntu-latest]
39+
40+
runs-on: ${{ matrix.os }}
41+
42+
steps:
43+
- name: Mask secrets
44+
run: |
45+
echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}"
46+
47+
- uses: actions/checkout@v6
48+
49+
- name: Use Node.js 24
50+
uses: actions/setup-node@v6
51+
with:
52+
node-version: 24
53+
package-manager-cache: false
54+
55+
- name: Enable corepack
56+
run: |
57+
corepack enable
58+
corepack prepare yarn@stable --activate
59+
60+
- name: Activate cache for yarn
61+
uses: actions/setup-node@v6
62+
with:
63+
cache: yarn
64+
65+
- name: Install dependencies
66+
run: yarn
67+
68+
- name: Build CLI from source
69+
run: yarn build
70+
71+
- name: Run E2E tests
72+
env:
73+
APIFY_CLI_DISABLE_TELEMETRY: 1
74+
TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
75+
run: yarn test:e2e

cucumber.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

features/actor-run-input.feature.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

features/builds-namespace.feature.md

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)