Skip to content

added plotting unit tests and ge scale ridge penalty #57

added plotting unit tests and ge scale ridge penalty

added plotting unit tests and ge scale ridge penalty #57

name: Publish to PyPi
on:
release:
types:
- published
push:
branches:
- main
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Ruff Linting
uses: chartboost/ruff-action@v1
with:
version: 0.0.289
- name: Black Format Check
uses: psf/black@stable
with:
options: "--check"
src: "."
jupyter: false
version: "~= 23.3" # this is the version that ships with the vs code extension, currently
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install multidms
run: |
pip install -e ".[dev]"
- name: Test
run: |
pytest multidms tests
# pytest --doctest-modules multidms tests
- name: Build python package
run: |
python -m pip install build
python -m build --wheel
# if you push with a new tag using bumpver,
# then we publish to test PyPI
- name: Publish package distributions to TestPyPI
if: ${{ github.event_name == 'push' && startsWith(github.event.head_commit.message, 'bump version') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# only publish and update to PyPI if you cut a new release
- name: Publish package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1