Skip to content

Prism cython

Prism cython #362

Workflow file for this run

name: TestingWithConda
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- '*'
jobs:
build_and_test:
name: Testing (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: geoana-test
channels: conda-forge
python-version: ${{ matrix.python-version }}
- name: Install Env
run: |
conda info
conda list
conda config --show
conda install --quiet --yes pip numpy scipy "matplotlib>=3.5.0" ipython cython;
conda install --quiet --yes discretize libdlf setuptools_scm utm pytest pytest-cov graphviz
conda install --quiet --yes sphinx sphinx-gallery pydata-sphinx-theme numpydoc nbsphinx
conda install --quiet --yes pytest pytest-cov
- name: Install Our Package
run: |
export BUILD_GEOANA_EXT=1
pip install -e .
conda list
- name: Run Tests
run: |
pytest --cov-config=.coveragerc --cov=geoana --cov-report=xml -s -v -W ignore::DeprecationWarning
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version }} == '3.10'
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
distribute:
name: Publish Source to Pypi
needs: build_and_test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: geoana-test
channels: conda-forge
python-version: '3.10'
- name: Install Env
run: |
conda info
conda list
conda config --show
conda install --quiet --yes pip numpy scipy "matplotlib>=3.5.0" ipython cython;
conda install --quiet --yes discretize libdlf setuptools_scm utm pytest pytest-cov graphviz
pip install -r requirements_dev.txt
- name: Prepare source distribution
run: |
export BUILD_GEOANA_EXT=1
python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
- name: Install package
run: |
export BUILD_GEOANA_EXT=1
pip install -e .
- name: Build documentation
run: |
cd docs
make html
cd ..
- name: GitHub Pages
# You may pin to the exact commit or the version.
uses: crazy-max/[email protected]
with:
# Git domain (default github.com)
# domain: # optional, default is github.com
# GitHub repository where assets will be deployed (default $GITHUB_REPOSITORY)
# repo: # optional
# Git branch where assets will be deployed
# target_branch: # optional, default is gh-pages
# Create incremental commit instead of doing push force
# keep_history: # optional, default is false
# Allow an empty commit to be created
# allow_empty_commit: # optional, default is true
# Build directory to deploy
build_dir: docs/_build/html
# The committer name and email address
# committer: # optional
# The author name and email address
# author: # optional
# Commit message
# commit_message: # optional
# Write the given domain name to the CNAME file
fqdn: geoana.simpeg.xyz
# Allow Jekyll to build your site
jekyll: false # optional, default is true
# If enabled, nothing will be pushed
# dry_run: true # optional, default is false
# Enable verbose output
# verbose: true # optional, default is false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}