Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ indent_size = 4

[*.yaml]
indent_size = 4

[*.json]
indent_size = 4
indent_style = tab
42 changes: 42 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "pnpm install"
description: "Run pnpm install with cache enabled"
runs:
using: "composite"
steps:
- name: Set up swap space
if: runner.os == 'Linux'
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 10

- uses: pnpm/action-setup@v4.1.0
name: Install pnpm
with:
run_install: false

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- name: Install dependencies
shell: bash
run: |
pnpm install --frozen-lockfile --prefer-offline --loglevel error
env:
HUSKY: "0"
140 changes: 24 additions & 116 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,15 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Run TSC
run: yarn build
run: pnpm run build

- name: Ensure the reference documentation builds
run: yarn update-docs
run: pnpm run update-docs

lint:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand All @@ -66,26 +55,15 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Run lint checks
run: yarn lint
run: pnpm run lint

- name: Run format checks
run: yarn format
run: pnpm run format

test_local:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand Down Expand Up @@ -113,34 +91,18 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for npm
uses: actions/setup-node@v6
with:
cache: npm

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Setup Python 3.12 (Windows)
if: ${{ matrix.os == 'windows-2025' }}
uses: actions/setup-python@v6
with:
python-version: 3.14

- name: Install Dependencies
run: yarn

- name: Run local tests
run: yarn test:local
run: pnpm run test:local

test_api:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand All @@ -162,30 +124,14 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for npm
uses: actions/setup-node@v6
with:
cache: npm

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Run API tests
env:
TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
run: yarn test:api
run: pnpm run test:api

test_python_support:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand Down Expand Up @@ -213,25 +159,9 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for npm
uses: actions/setup-node@v6
with:
cache: npm

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
Expand All @@ -241,7 +171,7 @@ jobs:
- name: Run Python tests
env:
TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
run: yarn test:python
run: pnpm run test:python

docs:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand All @@ -257,26 +187,15 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Build & deploy docs
run: |
cd website
yarn
yarn build
pnpm install
pnpm run build

build_bundles:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
Expand Down Expand Up @@ -305,20 +224,9 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ env.LATEST_NODE_VERSION }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Install bun
uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -351,7 +259,7 @@ jobs:
bun build --compile --target=bun-windows-x64-baseline --outfile test index.ts

- name: Build Bundles
run: yarn insert-cli-metadata && yarn build-bundles
run: pnpm run insert-cli-metadata && pnpm run build-bundles

- name: Upload Bundles
uses: actions/upload-artifact@v7
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/cucumber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,12 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn

- name: Install Dependencies
run: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Run Cucumber tests
env:
APIFY_CLI_DISABLE_TELEMETRY: 1
TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
run: yarn test:cucumber
run: pnpm run test:cucumber
24 changes: 7 additions & 17 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,22 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for yarn
uses: actions/setup-node@v6
with:
cache: yarn
- name: Install pnpm and dependencies
uses: ./.github/actions/pnpm-install

- name: Build docs
run: |
# install project deps
yarn
# update next docs reference
yarn update-docs
pnpm run update-docs
# go to website dir
cd website
# install website deps
yarn
pnpm install
# install the latest theme version
yarn add @apify/docs-theme@latest
pnpm add @apify/docs-theme@latest
# build the docs
yarn build
pnpm run build
env:
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_DOCS_PROJECT_KEY }}
GIT_USER: "apify-service-account:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}"
Expand All @@ -66,7 +56,7 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "chore: Automatic theme updating workflow [skip ci]"
file_pattern: "website/package*.json website/yarn.lock"
file_pattern: "website/package*.json website/pnpm-lock.yaml"
commit_user_name: Apify Bot
commit_user_email: my-github-actions-bot@example.org
commit_author: Apify Bot <apify@apify.com>
Expand Down
Loading
Loading