Skip to content

Commit

Permalink
Update python-package-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenngocbinh authored Oct 17, 2023
1 parent c91f780 commit 6ce3338
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions .github/workflows/python-package-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
name: Python CI
name: Python Package Workflow

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: pip install -r requirements.txt
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run Tests
run: pytest
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Run Linters
run: pylint vnstock
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r python-package/requirements.txt
- name: Run Code Style Check
run: flake8 vnstock
- name: Run tests
run: |
cd python-package
python -m unittest discover tests
- name: Report Test Coverage
run: coverage run -m pytest
- name: Upload coverage to Codecov
run: codecov
- name: Upload to PyPI
if: startsWith(github.ref, 'refs/tags/')
run: |
cd python-package
python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 6ce3338

Please sign in to comment.