Skip to content

Pandora plugin libSGM CI #623

Pandora plugin libSGM CI

Pandora plugin libSGM CI #623

name: Pandora plugin libSGM CI
on:
push:
schedule:
- cron: 0 2 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip freeze
- name: Install Pandora plugin libSGM
run: |
pip install .[dev]
pip freeze
- name: Clone Pandora submodule
run: |
mkdir submodule
cd submodule
pandora_version=$(pip freeze | grep pandora | sed -n '1 p')
pandora_version=${pandora_version##*=}
echo $pandora_version
git clone https://github.com/cnes/pandora --branch ${pandora_version} --depth 1
- name: Test with pytest
run: |
pytest --junitxml=pytest-report.xml --cov-config=.coveragerc --cov-report xml --cov
- name: Test with pytest pandora's notebooks
run: |
cd submodule/pandora
pip install .[notebook,dev]
hash -r
export NUMBA_DISABLE_JIT="0"
pytest -m notebook_tests
cd ../..
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Create source distrubition
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
pip install build
python -m build --sdist
- name: Publish package on pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}