Skip to content

Merge pull request #8 from segevfiner/python3.13 #81

Merge pull request #8 from segevfiner/python3.13

Merge pull request #8 from segevfiner/python3.13 #81

name: Build & Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: windows-latest
python-version: '3.12'
- os: macos-13
python-version: '3.12'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Set up Homebrew
if: ${{ runner.os == 'Linux' }}
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install depdencecies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
brew install flex bison
- name: Install depdencecies (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
Invoke-WebRequest https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip -OutFile win_flex_bison-2.5.25.zip
Expand-Archive win_flex_bison-2.5.25.zip tools
echo "$PWD\tools" >> $env:GITHUB_PATH
- name: Install depdencecies (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
brew install flex bison
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
- name: Install
run: |
pip install -e .[dev]
env:
SETUPTOOLS_ENABLE_FEATURES: legacy-editable
- name: Lint with flake8
if: ${{ matrix.python-version != '3.7' }}
run: |
# stop the build if there are Python syntax errors or undefined names
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 --statistics
- name: Test with pytest
run: |
pytest -v