-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from ColCarroll/new-build
New build
- Loading branch information
Showing
4 changed files
with
43 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,43 @@ | ||
name: ridge_map build | ||
on: [push] | ||
name: unittests & auto-publish | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6,3.7] | ||
pytest-job: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install . | ||
python -m pip install pydocstyle pytest pylint pytest-cov black coveralls | ||
python-version: "3.10" | ||
- run: pip --version | ||
- run: pip install . | ||
- run: pip install pydocstyle pytest pylint pytest-cov black | ||
- run: pip freeze | ||
- name: Run tests | ||
run: ./scripts/test.sh | ||
|
||
# Auto-publish when version is increased | ||
publish-job: | ||
# Only try to publish if: | ||
# * Repo is self (prevents running from forks) | ||
# * Branch is `main` | ||
if: | | ||
github.repository == 'colcarroll/ridge_map' | ||
&& github.ref == 'refs/heads/main' | ||
needs: pytest-job # Only publish after tests are successful | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
# Publish the package (if local `__version__` > pip version) | ||
- uses: etils-actions/pypi-auto-publish@v1 | ||
with: | ||
pypi-token: ${{ secrets.PYPI_API_TOKEN }} | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} | ||
parse-changelog: false |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"""A library for plotting ridges with ridges.""" | ||
|
||
__version__ = "0.0.4" | ||
from .ridge_map import RidgeMap, FontManager |
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