This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
Update dependency setuptools to v72 #156
Workflow file for this run
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: CI | |
on: | |
push: | |
paths: | |
- 'spatialtis/**' | |
- 'tests/**' | |
- 'setup.cfg' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- 'requirements.ci.txt' | |
pull_request: | |
paths: | |
- 'spatialtis/**' | |
- 'tests/**' | |
- 'setup.cfg' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- 'requirements.ci.txt' | |
jobs: | |
Test: | |
runs-on: ${{ matrix.os }} | |
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10'] | |
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 lightGBM | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install lightgbm | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install -r requirements.ci.txt | |
# install spatialtis | |
pip install -e . | |
- name: Lint with flake8 | |
run: | | |
pip install flake8 | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 spatialtis --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 spatialtis --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pytest --cov=spatialtis/ --cov-report=xml tests/ | |
- name: Codecov | |
uses: codecov/codecov-action@v3.0.0 | |
with: | |
# User defined upload name. Visible in Codecov UI | |
name: spatialtis-cov | |
# Repository upload token - get it from codecov.io. Required only for private repositories | |
token: ab86b03c-b0e3-4dbe-9179-50ded208ae5f | |
Upload_to_test_pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and check | |
run: | | |
python setup.py sdist bdist_wheel | |
twine check dist/* | |
- name: List wheels | |
if: matrix.os != 'windows-latest' | |
run: find dist/* | |
- name: Publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* |