Integrate snews-data-formats into snews_pt #44
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
name: Mac 14 | |
Python 3.11-12 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-14 | |
strategy: | |
# Add a list of python versions we want to use for testing. | |
matrix: | |
python-version: ['3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
pip install flake8 | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Install librdkafka | |
run: brew install librdkafka | |
# - name: Install hop-client | |
# run: conda install -c conda-forge hop-client | |
- name: Install hop-client | |
run: | | |
pip install setuptools wheel | |
wget https://files.pythonhosted.org/packages/64/d1/108cea042128c7ea7790e15e12e3e5ed595bfcf4b051c34fe1064924beba/hop-client-0.9.0.tar.gz | |
tar -xzf hop-client-0.9.0.tar.gz | |
cd hop-client-0.9.0 | |
python setup.py install | |
cd $GITHUB_WORKSPACE | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- shell: bash | |
env: | |
USERNAME: ${{ secrets.username }} | |
PASSWORD: ${{ secrets.password }} | |
run: | | |
/usr/bin/expect << HOP | |
spawn hop auth add | |
expect "Username:" | |
send "$USERNAME\n" | |
expect "Password:" | |
send "$PASSWORD\n" | |
expect "Hostname (may be empty):" | |
send "kafka.scimma.org\n" | |
expect "Token endpoint (empty if not applicable):" | |
send "\n" | |
expect eof | |
HOP | |
hop auth locate | |
- name: Install snews-pt | |
run: pip install . | |
- name: Check version | |
run: snews_pt --version | |
- name: Run pytest | |
run: | | |
pip install pytest | |
pytest snews_pt |