Skip to content

IGRF-14 and C 2.7 update #97

IGRF-14 and C 2.7 update

IGRF-14 and C 2.7 update #97

Workflow file for this run

# 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: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
numpy-ver: ["latest"]
test_config: ["latest"]
include:
# Support different GA Mac environmnets
- python-version: "3.9"
os: "macos-13"
- python-version: "3.10"
os: "macos-13"
- python-version: "3.11"
os: "macos-latest"
- python-version: "3.12"
os: "macos-latest"
# NEP29 compliance settings
- python-version: "3.10"
numpy-ver: "1.25"
os: "ubuntu-latest"
test_config: "NEP29"
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 }}
architecture: 'x64'
- name: Install NEP29 dependencies
if: ${{ matrix.test_config == 'NEP29'}}
run: |
pip install numpy==${{ matrix.numpy-ver }}
- name: Install standard and test dependencies
run: pip install --upgrade-strategy only-if-needed .[test]
- name: Install on Linux/Windows
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'}}
run: |
python -m build .
pip install -e .
- name: Install on MacOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }}
run: |
brew reinstall gcc
python -m build .
pip install -e .
- 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: Run unit and integration tests
run: pytest --cov=aacgmv2 --cov-report xml
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run=${{ join(matrix.*, '-') }}
parallel: true
format: cobertura
debug: true
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: dist/*.whl
if-no-files-found: warn
finish:
name: Finish Coverage Analysis
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true