Update requirements #107
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: Insolver testing | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
isDev: | |
- ${{ contains(github.ref, 'dev') }} | |
exclude: | |
- isDev: true | |
os: windows-latest | |
- isDev: true | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install libomp for lightgbm (macOS) | |
if: matrix.os == 'macos-latest' | |
run: brew install libomp | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install wheel ruff pytest pytest-cov black[jupyter] | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with black | |
shell: bash | |
run: | | |
black . --check --line-length 120 | |
- name: Lint with ruff | |
shell: bash | |
run: | | |
ruff . --select=E9,F63,F7,F82 --show-source | |
ruff . --exit-zero --statistics | |
- name: Test with pytest | |
shell: bash | |
run: | | |
python -m pytest --cov=./ --cov-report=xml | |
- name: Code coverage with codecov on (ubuntu-latest & Python 3.10 & master) | |
if: | | |
(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.ref == 'refs/heads/master') | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unittests | |
name: codecov-insolver | |
fail_ci_if_error: false | |
files: ./coverage.xml |