Skip to content
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
df2311b
feat: Test coverage and automate publish
ankitdas13 Apr 14, 2023
713b2cc
Update ci.yml
ankitdas13 Apr 14, 2023
f41bab9
Update setup.py
ankitdas13 Apr 14, 2023
dbf2c6a
Update ci.yml
ankitdas13 Apr 14, 2023
805ebdc
Update ci.yml
ankitdas13 Apr 14, 2023
23b9c86
Update ci.yml
ankitdas13 Apr 14, 2023
76d4b00
Update ci.yml
ankitdas13 Apr 14, 2023
9021f93
Update ci.yml
ankitdas13 Apr 14, 2023
7beb9f1
Update ci.yml
ankitdas13 Apr 14, 2023
a980e25
Update ci.yml
ankitdas13 Apr 14, 2023
69a6035
Update ci.yml
ankitdas13 Apr 14, 2023
3d6f157
Update ci.yml
ankitdas13 Apr 14, 2023
132a401
Update ci.yml
ankitdas13 Apr 14, 2023
d9f3667
Update ci.yml
ankitdas13 Apr 17, 2023
5975254
Update setup.py
ankitdas13 Apr 17, 2023
63cd16e
Update ci.yml
ankitdas13 Apr 17, 2023
871f576
Update ci.yml
ankitdas13 Apr 17, 2023
3d195d1
Update ci.yml
ankitdas13 Apr 17, 2023
1adb7a8
Update ci.yml
ankitdas13 Apr 17, 2023
2c1e61e
add publish job
ankitdas13 Apr 19, 2023
28be780
Update ci.yml
ankitdas13 Apr 19, 2023
20db8d7
Update ci.yml
ankitdas13 Apr 19, 2023
95e9e64
Update ci.yml
ankitdas13 Apr 19, 2023
479c618
Update ci.yml
ankitdas13 Apr 19, 2023
5cbf553
Update ci.yml
ankitdas13 Apr 19, 2023
5246297
Update ci.yml
ankitdas13 Apr 19, 2023
09eb13e
Update ci.yml
ankitdas13 Apr 19, 2023
18ce0c2
Update ci.yml
ankitdas13 Apr 19, 2023
19e2f59
Update ci.yml
ankitdas13 Apr 20, 2023
5810786
Update ci.yml
ankitdas13 Apr 20, 2023
0aad5d0
Update ci.yml
ankitdas13 Apr 20, 2023
748894d
Update ci.yml
ankitdas13 Apr 20, 2023
cd4137a
Update ci.yml
ankitdas13 Apr 20, 2023
d7ab432
Update ci.yml
ankitdas13 Apr 20, 2023
9b97553
Python 3.10 workflow test
ankitdas13 Apr 20, 2023
72f301b
Update ci.yml
ankitdas13 Apr 20, 2023
1e3357d
remove testpypi
ankitdas13 Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI
on:
push:
branches:
- master
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m build
python -m pip install --upgrade twine
python -m twine check dist/*

- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/
test:
name: Test Coverage
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install responses
pip install coverage
python ${{ github.workspace }}/setup.py install
- name: Run Tests
run: |
python -m coverage run -m unittest
python -m coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Publish packages to PyPi
run: |
python -m pip install --upgrade twine
set -ex
export VERSION=$(python3 setup.py --version)
python -m twine upload --verbose dist/razorpay-$VERSION-py3-none-any.whl dist/razorpay-$VERSION.tar.gz
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is twine used for.
And we don't need gpg keys here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need twin for publish the sdk and we dont need gpg key here. Also for testing, I tried to publish our repo in test.pypi ( development repository ) and it dont ask any gpg key.

Check this job this once
https://github.com/razorpay/razorpay-python/actions/runs/4751988677/jobs/8441800971

TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}