Skip to content

Updated the CI and requirements to separate python versions (#29) #2

Updated the CI and requirements to separate python versions (#29)

Updated the CI and requirements to separate python versions (#29) #2

name: Build & Tests - Words'n Fun
on:
push:
branches:
- 'main'
- 'release/v*'
paths-ignore:
- 'version.txt'
- '.github/workflows/**'
- '*.md'
- 'LICENSE'
- 'Makefile'
pull_request:
types: [opened, reopened, edit, synchronize]
branches:
- 'main'
- 'release/v*'
paths-ignore:
- 'version.txt'
- '.github/workflows/**'
- '*.md'
- 'LICENSE'
- 'Makefile'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install package & dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
python setup.py install
pip install pytest
pip install flake8
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 words_n_fun --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings.
flake8 words_n_fun --count --exit-zero --max-complexity=10 --ignore=E501,W503,E266,W605,C901 --statistics
- name: Test WNF
run: pytest
build-spacy:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install package & dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.3.0/fr_core_news_sm-3.3.0-py3-none-any.whl
pip install .[lemmatizer]
pip install pytest
pip install flake8
- name: Lint with flake8
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.
flake8 . --count --exit-zero --max-complexity=10 --ignore=E501 --statistics
- name: Test WNF
run: pytest
build-local:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install package & dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install -r requirements.txt
python setup.py develop
- name: Test WNF
run: pytest