Skip to content

Commit

Permalink
Merge pull request #13 from statefb/fix
Browse files Browse the repository at this point in the history
fix: workflow
  • Loading branch information
statefb authored Dec 30, 2022
2 parents 4dd6a2d + f5d4368 commit 318fc8e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
13 changes: 2 additions & 11 deletions .github/workflows/main.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and upload to PyPI
name: Test

on:
push:
Expand All @@ -12,19 +12,10 @@ jobs:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- run: Rscript -e 'install.packages("dtw")'
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9" # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
- run: pip install -e .
- run: pip install -r tests/requirements.txt
- run: python tests/test_cost.py

deploy:
runs-on: ubuntu-latest
steps:
- uses: pypa/[email protected]
with:
user: ${{ secrets.PYPI_USER_NAME }}
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
1 change: 0 additions & 1 deletion tests/requirements.py

This file was deleted.

1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rpy2

0 comments on commit 318fc8e

Please sign in to comment.