Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

ci: use standalone apify-cli binary in E2E tests (#3543)

Martin Adámekbe6dbc48ef0e
diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml
index 291583b64..216abc392 100644
--- a/.github/workflows/test-e2e.yml
+++ b/.github/workflows/test-e2e.yml
@@ -53,11 +53,15 @@ jobs:
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- - name: Login to Apify
- run: npx -y apify-cli@beta login -t ${{ secrets.APIFY_SCRAPER_TESTS_API_TOKEN }}
+
+ - name: Setup Apify CLI
+ uses: apify/setup-apify-cli-action@main
+ with:
+ version: 'beta'
+ token: ${{ secrets.APIFY_SCRAPER_TESTS_API_TOKEN }}
- name: Add Apify secrets for E2E tests
- run: npx -y apify-cli@beta secrets add anthropicApiKey ${{ secrets.ANTHROPIC_API_KEY }}
+ run: apify secrets add anthropicApiKey ${{ secrets.ANTHROPIC_API_KEY }}
- name: Install Dependencies
run: yarn
diff --git a/test/e2e/tools.mjs b/test/e2e/tools.mjs
index 2835e9c28..9e2aadfe4 100644
--- a/test/e2e/tools.mjs
+++ b/test/e2e/tools.mjs
@@ -71,7 +71,7 @@ export function getActorTestDir(url) {
export async function pushActor(client, dirName) {
await copyPackages(dirName);
try {
- execSync('npx -y apify-cli@beta push', {
+ execSync('apify push', {
cwd: dirName,
env: { ...process.env, GIT_CEILING_DIRECTORIES: dirname(dirName) },
});