Clean warning update #700
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
# This workflow will install Python dependencies, run tests and lint with a | |
# variety of Python versions. For more information see: | |
# https://help.github.com/actions/language-and-framework-guides/ | |
# using-python-with-github-actions | |
name: Pytest with Flake8 | |
on: [pull_request, push] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10", "3.11"] | |
numpy_ver: ["latest"] | |
test_config: ["latest"] | |
include: | |
# NEP29 compliance settings | |
- python-version: "3.9" | |
numpy_ver: "1.21" | |
os: ubuntu-latest | |
test_config: "NEP29" | |
# Operational compliance settings | |
- python-version: "3.6.8" | |
numpy_ver: "1.19.5" | |
os: "ubuntu-20.04" | |
test_config: "Ops" | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }} | |
runs-on: ${{ matrix.os }} | |
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 Operational dependencies | |
if: ${{ matrix.test_config == 'Ops'}} | |
run: | | |
pip install numpy==${{ matrix.numpy_ver }} | |
pip install "cdflib<1.0" | |
pip install -r requirements.txt | |
pip install -r test_requirements.txt | |
pip install . | |
- name: Install NEP29 dependencies | |
if: ${{ matrix.test_config == 'NEP29'}} | |
run: | | |
pip install numpy==${{ matrix.numpy_ver }} | |
pip install --upgrade-strategy only-if-needed -r requirements.txt | |
pip install --upgrade-strategy only-if-needed -r test_requirements.txt | |
pip install . | |
- name: Install standard dependencies | |
if: ${{ matrix.test_config == 'latest'}} | |
run: | | |
pip install -r test_requirements.txt | |
pip install -r requirements.txt | |
pip install . | |
- name: Set up pysat | |
run: | | |
mkdir pysatData | |
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'" | |
- name: Test PEP8 compliance | |
run: flake8 . --count --select=D,E,F,H,W --show-source --statistics | |
- name: Evaluate complexity | |
run: flake8 . --count --exit-zero --max-complexity=10 --statistics | |
- name: Install Operational dependencies success | |
if: ${{ matrix.test_config == 'Ops'}} | |
run: | | |
pip install pysatNASA==0.0.5 | |
which python | |
python --version | |
python -c "import pysatNASA; print(pysatNASA.__version__)" | |
- name: Run unit and integration tests | |
run: pytest --cov=pysatModels/ | |
- name: Publish results to coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --rcfile=setup.cfg --service=github |