Skip to content

Commit

Permalink
Merge pull request #135 from AH-Merii/create-release-0.5.0dev
Browse files Browse the repository at this point in the history
Add automated tests and release v0.5.0-dev
  • Loading branch information
a-r-j authored Aug 28, 2023
2 parents 45982fb + 0aa13e3 commit 32b8deb
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,51 @@
name: Publish BioPandas to PyPI / GitHub

on:
push:
tags:
- "v*"
pull_request:
branches: [ main ]

jobs:
test-style:
name: Run style tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'

- name: Install package dependencies for testing
run: pip install [test]

- name: Run all the pytest tests
run: flake8 ./biopandas

test-pytest:
name: Run pytest tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'

- name: Install package dependencies for testing
run: pip install .[test]

- name: Run all the pytest tests
run: pytest ./biopandas -sv

build-n-publish:
needs: [test-pytest,test-style] # only runs if tests are passing
if: startsWith(github.ref, 'refs/tags/v') # Check if the tag starts with 'v'
name: Build and publish to PyPI
runs-on: ubuntu-latest

Expand Down Expand Up @@ -41,7 +81,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
prerelease: true

- name: Get Asset name
run: |
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
include_package_data=True,
install_requires=install_reqs,
extras_require={'test': ['pytest', 'pytest-cov','flake8'],}
license='BSD 3-Clause',
platforms='any',
classifiers=[
Expand Down

0 comments on commit 32b8deb

Please sign in to comment.