Skip to content

ci(check): filter jobs by changes #179

ci(check): filter jobs by changes

ci(check): filter jobs by changes #179

Workflow file for this run

name: E2E Tests
on:
# Run after a pre-release is published to npm
workflow_run:
workflows: ["Create a pre-release"]
types: [completed]
branches: [master]
pull_request:
branches: [master]
# Manual trigger — pick any branch in the Actions UI to test that branch's build.
workflow_dispatch:
# Daily fallback at 06:00 UTC
schedule:
- cron: "0 6 * * *"
concurrency:
group: e2e-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
source:
- 'src/**'
- 'test/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'tsconfig*.json'
- 'tsdown.config.*'
- 'vitest.config.*'
e2e:
if: >
startsWith(github.repository, 'apify/') &&
(github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') &&
(github.event_name != 'pull_request' || needs.changes.outputs.source == 'true')
needs: [changes]
name: E2E Tests (${{ matrix.os }})
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Mask secrets
run: |
echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}"
- uses: actions/checkout@v6
- name: Use Node.js 24
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main
- name: Build CLI from source
run: pnpm run build
- name: Run E2E tests
env:
APIFY_CLI_DISABLE_TELEMETRY: 1
TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}
run: pnpm run test:e2e