Skip to content

macos support

macos support #4

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: (MacOS) yandex-taxi-testsuite package tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- name: Install database dependencies
run: |
brew update
brew install redis clickhouse rabbitmq postgresql mongosh
brew link postgresql
- uses: actions/checkout@v2
- name: Install Kafka
run: |
brew install java
export JAVA_HOME=/opt/homebrew/opt/openjdk
echo "Java home: $JAVA_HOME"
java -version
curl https://dlcdn.apache.org/kafka/3.8.0/kafka_2.13-3.8.0.tgz -o kafka.tgz
sudo mkdir -p /etc/kafka
sudo tar xf kafka.tgz --directory=/etc/kafka
cd /etc/kafka
sudo cp -r kafka_2.13-3.8.0/* ./
sudo rm -rf kafka_2.13-3.8.0
brew install grep
export PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"
which grep
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
brew install pytest virtualenv
make setup-dev-venv
- name: Lint with flake8
run: |
make venv-linters
- name: Check PEP8 with black
run: |
make venv-check-black
- name: Run misc tests
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-vvs --ignore-glob='*databases*' --ignore-glob='*mongo*'"
run: |
make venv-tests
- name: Run databases tests
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-vvs --ignore-glob='*mongo*'"
run: |
make venv-tests
- name: Run examples tests
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST: pytest
PYTEST_ARGS: "-vvs"
run: |
make venv-test-examples
- name: Rerun mysql tests with MariaDB
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-k mysql -vvs"
run: |
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
sudo apt install -y mariadb-server
make venv-tests
- name: Build documentation
run: |
make build-docs