Skip to content

Commit

Permalink
Create python-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Bougeant authored Aug 2, 2024
1 parent f2d2b92 commit 8a596b4
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with black, isort and flake8
run: |
black ml_toolbox tests setup.py --check --verbose
isort ml_toolbox tests setup.py --check-only
flake8 ml_toolbox tests setup.py --count --max-complexity=10 --max-line-length=88 --show-source --statistics
- name: Test with pytest
run: |
pytest --cov=ml_toolbox --capture=no --verbose tests --cov-report xml:coverage/coverage.xml --cov-report term-missing

0 comments on commit 8a596b4

Please sign in to comment.