Skip to content

0.5.4

0.5.4 #91

Workflow file for this run

name: CI
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
pandas: [
pandas==2.0.0,
pandas==2.1.0,
pandas==2.2.0,
pandas
]
exclude:
- python-version: 3.8
pandas: pandas==2.1.0
- python-version: 3.8
pandas: pandas==2.2.0
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install poetry
poetry config virtualenvs.create false
poetry install -v -E all
# reinstall pandas to specific version
pip install -U "$PANDAS"
env:
PANDAS: ${{ matrix.pandas }}
- name: Run flake8
run: flake8 datar_pandas
- name: Show versions
run: python -c 'import datar; datar.get_versions()'
- name: Test with pytest
run: pytest tests/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
if: matrix.python-version == 3.10 && matrix.pandas == 'pandas' && github.event_name != 'pull_request'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: cov.xml
# build-modin:
# runs-on: ubuntu-20.04
# strategy:
# fail-fast: false
# matrix:
# python-version: [3.7, 3.8, 3.9]
# modin: [
# "modin[dask]==0.10.2",
# "modin[dask]<0.16.0", # 0.16 uses pandas 1.5.0
# "modin[dask]" # lastest
# ]
# exclude:
# - python-version: 3.7
# modin: modin==0.10.2
# steps:
# - uses: actions/checkout@v2
# - name: Setup Python # Set Python version
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install flake8
# python -m pip install poetry
# poetry config virtualenvs.create false
# poetry install -v
# pip install -U scipy wcwidth
# # reinstall modin to specific version
# pip install -U "$MODIN"
# env:
# MODIN: ${{ matrix.modin }}
# - name: Show versions
# run: python -c 'import datar; from datar.core import plugin; datar.options(use_modin=True); datar.get_versions()'
# - name: Test with pytest
# run: pytest tests/ --modin --junitxml=junit/test-results-${{ matrix.python-version }}.xml
deploy:
needs: [build]
# needs: [build, build-modin]
runs-on: ubuntu-20.04
if: github.event_name == 'release'
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Publish to PyPI
run: poetry publish --build -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }}
if: success()