Test MacOS build #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [opened, reopened] | |
push: | |
branches-ignore: | |
- master | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Reindexer | |
run: | | |
brew tap restream/reindexer | |
brew install reindexer | |
shell: bash | |
- name: Setup PyReindexer | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python setup.py sdist bdist_wheel | |
shell: bash | |
- name: Deploy PyReindexer To Test-Pypi | |
env: | |
TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }} | |
run: | | |
python -m pip install twine | |
python -m twine upload --skip-existing --verbose --repository testpypi dist/* -u __token__ -p pypi-$TESTPYPI_TOKEN | |
# wait for deploy finishing on test pypi server | |
sleep 240 | |
shell: bash | |
test-macos: | |
runs-on: macos-latest | |
needs: deploy | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Reindexer | |
run: | | |
brew tap restream/reindexer | |
brew install reindexer | |
shell: bash | |
- name: Install PyReindexer | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -vvv --index-url https://test.pypi.org/simple/ --no-deps pyreindexer | |
shell: bash | |
- name: Prepare Test Environment | |
run: python -m pip install pytest==6.2.5 delegator envoy pyhamcrest==2.0.2 | |
shell: bash | |
- name: Test | |
run: | | |
python pip show pyreindexer | |
python -c "import sysconfig; print(sysconfig.get_path('purelib'))" | |
cd /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyreindexer | |
$GITHUB_WORKSPACE/.github/workflows/test.sh | |
shell: bash | |
test-ubuntu: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04,ubuntu-22.04] | |
fail-fast: false | |
runs-on: ${{matrix.os}} | |
env: | |
OS: ${{matrix.os}} | |
needs: deploy | |
steps: | |
- name: Install Reindexer-Dev | |
run: | | |
curl https://repo.reindexer.io/RX-KEY.GPG | sudo apt-key add | |
if [[ $OS == ubuntu-20.04 ]]; then | |
echo 'deb https://repo.reindexer.io/ubuntu-focal /' | sudo tee -a /etc/apt/sources.list | |
else | |
echo 'deb https://repo.reindexer.io/ubuntu-jammy /' | sudo tee -a /etc/apt/sources.list | |
fi | |
sudo apt-get update -y | |
sudo apt-get install -y libunwind-dev | |
sudo apt-get install -y reindexer-dev | |
shell: bash | |
- uses: actions/checkout@v4 | |
- name: Install PyReindexer | |
run: | | |
python3 -m pip install setuptools | |
python3 -m pip install -vvv --index-url https://test.pypi.org/simple/ --no-deps pyreindexer | |
shell: bash | |
- name: Install Reindexer-Server | |
run: sudo apt-get install reindexer-server | |
shell: bash | |
- name: Prepare Test Environment | |
run: python3 -m pip install pytest==6.2.5 delegator envoy pyhamcrest==2.0.2 | |
shell: bash | |
- name: Test | |
run: | | |
cd $(python3 -m site --user-site)/pyreindexer | |
$GITHUB_WORKSPACE/.github/workflows/test.sh | |
shell: bash |