Skip to content

Update pypi-release.yml #161

Update pypi-release.yml

Update pypi-release.yml #161

name: Python Package using Conda
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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"]
os: [macOS, ubuntu]
inlcude:
- os: macos-latest
PLAT: arm64
INTERFACE64: ""
platform: [x64]
steps:
- uses: actions/checkout@v2
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: ./continuous_integration/environment-actions.yml
activate-environment: pydda_env
auto-activate-base: False
mamba-version: '*'
use-mamba: true
miniforge-variant: Mambaforge
- name: Lint with flake8
run: |
conda 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
run: |
conda install pytest
pytest