Skip to content

Fix/steven issues

Fix/steven issues #478

Workflow file for this run

name: lidarwind_test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "7 18 * * 0"
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: checkout lidarwind
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .[plots,test]
- name: Cache sample data
id: cache-samples
uses: actions/cache@v3
with:
path: ~/.cache/lidarwind
key: ${{ runner.os }}-samples-${{ hashFiles('**/pyproject.toml') }}
- name: Test with pytest
run: |
pytest tests
coverage:
runs-on: ubuntu-latest
steps:
- name: checkout lidarwind
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: 'pyproject.toml'
- name: Coverage report
run: |
python -m pip install --upgrade pip
pip install -e .[test]
pytest --cov=./ --cov-report=xml
# pytest --cov=./ --cov-append --cov-report=xml --current-env --nbval-lax docs/examples/turbulence_6beam_data_rendered.ipynb
# pytest --cov=./ --cov-append --cov-report=xml --current-env --nbval-lax docs/examples/merging_6beam_rendered.ipynb
# pytest --cov=./ --cov-append --cov-report=xml --current-env --nbval-lax docs/examples/dbs_scans_rendered.ipynb
# pytest --cov=./ --cov-append --cov-report=xml --current-env --nbval-lax docs/examples/reading_long_dbs_rendered.ipynb
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
verbose: true