Skip to content

fix: add ci to python sdk #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build requests sseclient-py python-dotenv pytest
- name: Build package
run: python -m build
- name: Run Tests
env:
CB_PROJECT_ID: ${{ secrets.CB_PROJECT_ID }}
run: pytest

release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dry: true
update-file: pyproject.toml
allow-initial-development-versions: true
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
if: steps.semrel.outputs.version != ''
with:
user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Commonbase Python SDK"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.8"
version = "0.1.4"
version = "0.0.0"
dependencies = ["requests>=2.31.0", "sseclient-py>=1.7.2"]
urls.Homepage = "https://github.com/commonbaseapp/commonbase-python"
urls.Source = "https://github.com/commonbaseapp/commonbase-python"
Expand Down