Skip to content

chore: Add macos executor for unit tests #4029

chore: Add macos executor for unit tests

chore: Add macos executor for unit tests #4029

name: Run code checks
on:
# Trigger code checks on opening a new pull request.
# Secrets are only made available to the integration tests job, with a manual approval
# step required for PRs from forks. This prevents their potential exposure.
pull_request:
# Pushing to the master branch triggers code checks
push:
branches:
- master
tags-ignore:
- "**" # Ignore all tags to prevent duplicate checks when tags are pushed.
# It should also be possible to trigger checks manually
workflow_dispatch:
jobs:
lint_check:
name: Lint check
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
type_check:
name: Type check
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
unit_tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
env:
HTTPBIN_URL: 'asd'
steps:
- name: Os cleanup
if: runner.os == 'macOS'
run: |
sudo mdutil -i off /
launchctl unload -w /System/Library/LaunchAgents/com.apple.ecosystemanalyticsd.plist
sudo killall ecosystemanalyticsd
sudo killall Finder
sudo killall mds
sudo killall mds_stores
sudo killall mds_worker
sudo killall mdworker
sudo killall mdworker_shared
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv package manager
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: make install-dev
- name: Run unit tests
run: make unit-tests
docs_check:
name: Docs check
uses: apify/workflows/.github/workflows/python_docs_check.yaml@main
secrets: inherit