Merge pull request #108 from SNEWS2/update_github_workflows #1
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 ] | |
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 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 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 |