-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # poetry.lock # pyproject.toml
- Loading branch information
Showing
637 changed files
with
25,840 additions
and
4,605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
name: GitHub Action | ||
name: Test and Deploy | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches-ignore: | ||
- 'temp*' | ||
- 'tmp*' | ||
release: | ||
types: [ created ] | ||
types: | ||
- created | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: pre-commit | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -21,6 +29,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Start httpbin server | ||
run: | | ||
docker run -d -p 9876:80 kennethreitz/httpbin | ||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
|
@@ -32,17 +44,19 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
poetry install --extras 'aiohttp' | ||
- name: Ensure httpbin server is running | ||
run: | | ||
while true; do response=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:9876/get); if [ "$response" = "200" ]; then echo "HTTP 200 OK received"; break; else echo "Retrying..."; sleep 1; fi; done | ||
- name: Echo installed packages | ||
run: | | ||
poetry show | ||
- name: Test with pytest | ||
run: poetry run pytest -v -rs tests --runslow --cov=./ --cov-report=xml | ||
|
||
- name: Test with pytest (runtime type checking disabled) | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' | ||
run: poetry run pytest -v -rs tests --runslow | ||
env: | ||
STELLAR_SDK_RUNTIME_TYPE_CHECKING: 0 | ||
|
||
- name: Upload coverage to Codecov | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' | ||
uses: codecov/codecov-action@v3 | ||
|
@@ -55,6 +69,7 @@ jobs: | |
|
||
mypy-check: | ||
runs-on: ubuntu-latest | ||
needs: pre-commit | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -69,7 +84,7 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
poetry install --extras 'aiohttp' | ||
- name: Run mypy check | ||
run: | | ||
|
@@ -78,25 +93,24 @@ jobs: | |
poetry run mypy examples | ||
deploy: | ||
needs: test | ||
needs: [ test, mypy-check ] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
python-version: '3.11' | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Build Packages | ||
run: poetry build | ||
|
||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.test_pypi_api_token }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: "v2.1.1" | ||
hooks: | ||
- id: autoflake | ||
args: [--in-place, --ignore-init-module-imports, --remove-all-unused-imports] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: "5.11.5" | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.4.1' | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-requests==2.31.0.2, types-toml==0.10.8.7, types-urllib3==1.26.25.14] | ||
exclude: ^docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/en/conf.py | ||
builder: html | ||
fail_on_warning: false | ||
|
||
# We recommend specifying your dependencies to enable reproducible builds: | ||
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
- requirements: docs/requirements.txt | ||
|
||
# Build PDF & ePub | ||
formats: | ||
- epub | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.