Skip to content

The rec module

The rec module #241

Workflow file for this run

name: pytorch-widedeep
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
codestyle:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black flake8
- name: Code Style (Black/Flake8)
run: |
black --check --diff pytorch_widedeep tests examples setup.py
flake8 . --count --select=E901,E999,F821,F822,F823 --ignore=E266 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --ignore=E203,E266,E501,E721,E722,F401,F403,F405,F811,W503,C901 --statistics
test:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11"]
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
python -m pip install pytest pytest-cov codecov faker
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest and generate coverage
run: |
pytest --doctest-modules pytorch_widedeep --cov=pytorch_widedeep --cov-report=xml --cov-report=term --disable-pytest-warnings tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.python-version }}
fail_ci_if_error: true