kopia lustrzana https://github.com/bugout-dev/moonstream
Merge pull request #48 from bugout-dev/brood-spire-client-env-vars
Brood spire client env vars with github workflowspull/50/head
commit
2b7324195b
|
@ -0,0 +1,25 @@
|
|||
name: Lint Moonstream backend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "backend/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install test requirements
|
||||
working-directory: ./backend
|
||||
run: pip install -r requirements.txt
|
||||
# - name: Mypy type check
|
||||
# working-directory: ./backend
|
||||
# run: mypy moonstream/
|
||||
- name: Black syntax check
|
||||
working-directory: ./backend
|
||||
run: black --check moonstream/
|
|
@ -0,0 +1,25 @@
|
|||
name: Lint Moonstream crawlers
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "crawlers/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install test requirements
|
||||
working-directory: ./crawlers
|
||||
run: pip install -e .[dev]
|
||||
# - name: Mypy type check
|
||||
# working-directory: ./crawlers
|
||||
# run: mypy moonstreamcrawlers/
|
||||
- name: Black syntax check
|
||||
working-directory: ./crawlers
|
||||
run: black --check moonstreamcrawlers/
|
|
@ -0,0 +1,25 @@
|
|||
name: Lint Moonstream db
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "db/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install test requirements
|
||||
working-directory: ./db
|
||||
run: pip install -e .[dev]
|
||||
# - name: Mypy type check
|
||||
# working-directory: ./db
|
||||
# run: mypy moonstreamdb/
|
||||
- name: Black syntax check
|
||||
working-directory: ./db
|
||||
run: black --check moonstreamdb/
|
|
@ -0,0 +1,21 @@
|
|||
name: Build Moonstream frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "frontend/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "14.17.4"
|
||||
- name: Check build
|
||||
working-directory: ./frontend
|
||||
run: |
|
||||
yarn
|
||||
yarn build
|
|
@ -0,0 +1,32 @@
|
|||
name: Locust summary
|
||||
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: PR head repo
|
||||
id: head_repo_name
|
||||
run: |
|
||||
HEAD_REPO_NAME=$(jq -r '.pull_request.head.repo.full_name' "$GITHUB_EVENT_PATH")
|
||||
echo "PR head repo: $HEAD_REPO_NAME"
|
||||
echo "::set-output name=repo::$HEAD_REPO_NAME"
|
||||
- name: Checkout git repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ steps.head_repo_name.outputs.repo }}
|
||||
fetch-depth: 0
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
pip install bugout-locust
|
||||
- name: Generate and send Locust summary
|
||||
env:
|
||||
BUGOUT_SECRET: ${{ secrets.BUGOUT_SECRET }}
|
||||
run: |
|
||||
locust.github publish
|
|
@ -3,7 +3,9 @@ import os
|
|||
from bugout.app import Bugout
|
||||
|
||||
# Bugout
|
||||
bugout_client = Bugout()
|
||||
BUGOUT_BROOD_URL = os.environ.get("BUGOUT_BROOD_URL", "https://auth.bugout.dev")
|
||||
BUGOUT_SPIRE_URL = os.environ.get("BUGOUT_SPIRE_URL", "https://spire.bugout.dev")
|
||||
bugout_client = Bugout(brood_api_url=BUGOUT_BROOD_URL, spire_api_url=BUGOUT_SPIRE_URL)
|
||||
|
||||
# Default value is "" instead of None so that mypy understands that MOONSTREAM_APPLICATION_ID is a string
|
||||
MOONSTREAM_APPLICATION_ID = os.environ.get("MOONSTREAM_APPLICATION_ID", "")
|
||||
|
@ -14,13 +16,9 @@ MOONSTREAM_DATA_JOURNAL_ID = os.environ.get("MOONSTREAM_DATA_JOURNAL_ID")
|
|||
if MOONSTREAM_DATA_JOURNAL_ID is None:
|
||||
raise ValueError("MOONSTREAM_DATA_JOURNAL_ID environment variable must be set")
|
||||
|
||||
MOONSTREAM_ADMIN_ACCESS_TOKEN = os.environ.get(
|
||||
"MOONSTREAM_ADMIN_ACCESS_TOKEN"
|
||||
)
|
||||
MOONSTREAM_ADMIN_ACCESS_TOKEN = os.environ.get("MOONSTREAM_ADMIN_ACCESS_TOKEN")
|
||||
if MOONSTREAM_ADMIN_ACCESS_TOKEN is None:
|
||||
raise ValueError(
|
||||
"MOONSTREAM_ADMIN_ACCESS_TOKEN environment variable must be set"
|
||||
)
|
||||
raise ValueError("MOONSTREAM_ADMIN_ACCESS_TOKEN environment variable must be set")
|
||||
|
||||
# Origin
|
||||
RAW_ORIGINS = os.environ.get("MOONSTREAM_CORS_ALLOWED_ORIGINS")
|
||||
|
|
|
@ -4,5 +4,6 @@ export MOONSTREAM_APPLICATION_ID="<issued_bugout_application_id>"
|
|||
export MOONSTREAM_DATA_JOURNAL_ID="<bugout_journal_id_to_store_blockchain_data>"
|
||||
export MOONSTREAM_DB_URI="postgresql://<username>:<password>@<db_host>:<db_port>/<db_name>"
|
||||
export MOONSTREAM_POOL_SIZE=0
|
||||
export MOONSTREAM_AUTO_USER_TOKEN="<Access token to application resources>"
|
||||
|
||||
export MOONSTREAM_ADMIN_ACCESS_TOKEN="<Access token to application resources>"
|
||||
export BUGOUT_BROOD_URL="https://auth.bugout.dev"
|
||||
export BUGOUT_SPIRE_URL="https://spire.bugout.dev"
|
||||
|
|
|
@ -177,6 +177,7 @@ def crawl_blocks_executor(
|
|||
for error in errors:
|
||||
print(f"- {error}")
|
||||
|
||||
|
||||
def process_contract_deployments() -> List[Tuple[str, str]]:
|
||||
"""
|
||||
Checks for new smart contracts that have been deployed to the blockchain but not registered in
|
||||
|
|
|
@ -33,7 +33,7 @@ setup(
|
|||
package_data={"moonstreamcrawlers": ["py.typed"]},
|
||||
zip_safe=False,
|
||||
install_requires=[
|
||||
"moonstreamdb @ git+https://git@github.com/bugout-dev/moonstream.git@03a929568180d7eb53ea46a11f920db65ea7c772#egg=moonstreamdb&subdirectory=db",
|
||||
"moonstreamdb @ git+https://git@github.com/bugout-dev/moonstream.git@ec3278e192119d1e8a273cfaab6cb53890d2e8e9#egg=moonstreamdb&subdirectory=db",
|
||||
"requests",
|
||||
"tqdm",
|
||||
"web3",
|
||||
|
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue