Skip to content
Merged
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
16 changes: 4 additions & 12 deletions .github/workflows/e2e-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,16 @@ jobs:
with:
node-version: 24

- name: Cache Node Modules
uses: actions/cache@v5
with:
path: |
node_modules
key: cache-${{ github.run_id }}

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- name: Install browsers
run: npx playwright install
run: pnpm exec playwright install

- name: Build the project
run: npm run build
run: pnpm build

- name: Run benchmarks
run: npm run benchmark
run: pnpm benchmark

- name: Update the benchmark report
uses: stefanzweifel/git-auto-commit-action@v7
Expand Down
47 changes: 18 additions & 29 deletions .github/workflows/model-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,10 @@ jobs:
with:
node-version: 24

- name: Cache node modules + browsers
uses: actions/cache@v5
with:
path: |
~/.npm
~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- name: Install Playwright deps
run: npx playwright install
run: pnpm exec playwright install

- name: Install xvfb
run: |
Expand All @@ -42,19 +33,19 @@ jobs:

- name: Install Playwright browsers
run: |
npx playwright install webkit
npx playwright install chrome
npx playwright install msedge
pnpm exec playwright install webkit
pnpm exec playwright install chrome
pnpm exec playwright install msedge

- name: Install Playwright deps v2
run: npx playwright install-deps
run: pnpm exec playwright install-deps

- name: Collect HTTP header orders
run: |
xvfb-run -- node ./packages/header-order-collector/collector.js | tee ./packages/header-generator/src/data_files/headers-order.json

- name: Generate model
run: npm run buildNetwork
run: pnpm buildNetwork
env:
APIFY_FINGERPRINT_DATASET_ID: ${{ secrets.APIFY_FINGERPRINT_DATASET_ID }}

Expand All @@ -69,7 +60,7 @@ jobs:
./packages/header-generator/src/data_files/input-network-definition.zip
./packages/fingerprint-generator/src/data_files/fingerprint-network-definition.zip
./package.json
./package-lock.json
./pnpm-lock.yaml

test_model_js:
runs-on: ubuntu-22.04
Expand All @@ -84,8 +75,7 @@ jobs:
with:
node-version: 24

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- name: Download artifacts
uses: actions/download-artifact@v8
Expand All @@ -99,12 +89,12 @@ jobs:

- name: Test model changes (Node.JS packages)
run: |
npx playwright install --with-deps
npx puppeteer browsers install chrome
npx puppeteer browsers install firefox
pnpm exec playwright install --with-deps
pnpm exec puppeteer browsers install chrome
pnpm exec puppeteer browsers install firefox

npm run build
xvfb-run --auto-servernum -- npm test
pnpm build
xvfb-run --auto-servernum -- pnpm test

test_model_py:
needs: build_model
Expand All @@ -124,8 +114,7 @@ jobs:
with:
node-version: 24

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- uses: actions/download-artifact@v8
with:
Expand All @@ -134,10 +123,10 @@ jobs:
- name: Bump package version numbers
id: bump_version
run: |
npm version patch --git-tag-version=false
pnpm version patch --git-tag-version=false
export GIT_TAG=$(node -p "require('./package.json').version")

npm run prerelease
pnpm prerelease

echo "version=${GIT_TAG}" >> $GITHUB_OUTPUT

Expand All @@ -164,7 +153,7 @@ jobs:
branch: master
tagging_message: 'v${{ steps.bump_version.outputs.version }}'

file_pattern: './packages/ ./package.json ./package-lock.json ./apify_fingerprint_datapoints/CHANGELOG.md ./pyproject.toml'
file_pattern: './packages/ ./package.json ./pnpm-lock.yaml ./apify_fingerprint_datapoints/CHANGELOG.md ./pyproject.toml'

commit_user_name: 'modelmaker[bot] ⚒️'
commit_user_email: modelmaker[bot]@users.noreply.github.com
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/publish-to-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
registry-url: 'https://registry.npmjs.org/'
cache-dependency-path: 'package-lock.json'

- uses: apify/workflows/pnpm-install@main

- name: Turbo cache
id: turbo-cache
Expand All @@ -39,23 +39,20 @@ jobs:
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Install Dependencies
run: npm ci

- name: Release latest versions
run: |
git config --global user.name 'Apify Release Bot'
git config --global user.email 'noreply@apify.com'

export GIT_TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///g')
npm run release
pnpm release

- name: Commit the version bump
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: master
commit_message: 'chore: [skip ci] sync new package.json versions'
file_pattern: 'package*.json'
file_pattern: 'package*.json 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
34 changes: 9 additions & 25 deletions .github/workflows/test-and-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,9 @@ jobs:
with:
node-version: 24

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- name: Load Cache
uses: actions/cache@v5
with:
path: |
node_modules
key: cache-${{ github.run_id }}

- run: npm run lint
- run: pnpm lint

build_and_test:
name: Build & Test
Expand All @@ -56,23 +48,15 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node Modules
uses: actions/cache@v5
with:
path: |
node_modules
key: cache-${{ github.run_id }}

- name: Install Dependencies
run: npm ci
- uses: apify/workflows/pnpm-install@main

- name: Install Playwright deps
run: npx playwright install --with-deps
run: pnpm exec playwright install --with-deps

- name: Install Puppeteer deps
run: |
npx puppeteer browsers install chrome
npx puppeteer browsers install firefox
pnpm exec puppeteer browsers install chrome
pnpm exec puppeteer browsers install firefox

- name: Turbo cache
id: turbo-cache
Expand All @@ -84,12 +68,12 @@ jobs:
turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Build
run: npm run build
run: pnpm build

- name: Run Windows or MacOs tests
run: npm test
run: pnpm test
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'macos-latest' }}

- name: Run Linux tests
run: xvfb-run --auto-servernum -- npm test
run: xvfb-run --auto-servernum -- pnpm test
if: ${{ matrix.os == 'ubuntu-22.04'}}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pids
.idea
.vscode
yarn.lock
.yarn
tmp
jsconfig.json
types
Expand All @@ -22,5 +23,4 @@ docs/typedefs
.history
.docusaurus
tsconfig.tsbuildinfo
.turbo
.npmrc
.turbo
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
build
coverage

*.json
*.json
# pnpm
pnpm-lock.yaml
pnpm-workspace.yaml
Loading
Loading