Skip to content

Python Package using Conda #339

Python Package using Conda

Python Package using Conda #339

name: Python Package using Conda
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 2 * * *' # Runs at 2:00 AM UTC every day
jobs:
build:
name: ${{ matrix.os }}-${{ matrix.python-version }}
if: github.repository == 'openradar/PyDDA'
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: [macOS, ubuntu]
inlcude:
- os: macos-latest
PLAT: arm64
INTERFACE64: ""
platform: [x64]
steps:
- uses: actions/checkout@v5
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2.0.6
with:
create-args: python=${{ matrix.python-version }}
environment-file: continuous_integration/environment-actions-${{ matrix.python-version }}.yml
micromamba-version: '2.0.0-0'
environment-name: pydda-env
cache-downloads: false
- name: Install PyDDA
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Lint with flake8
shell: bash -l {0}
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pip install pytest
python -m pytest -v --cov=./ --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v5.5.1
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false