diff --git a/.github/workflows/lint.backend.yml b/.github/workflows/lint.backend.yml new file mode 100644 index 00000000..05d468c4 --- /dev/null +++ b/.github/workflows/lint.backend.yml @@ -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/ diff --git a/.github/workflows/lint.crawlers.yml b/.github/workflows/lint.crawlers.yml new file mode 100644 index 00000000..44c48bd3 --- /dev/null +++ b/.github/workflows/lint.crawlers.yml @@ -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/ diff --git a/.github/workflows/lint.db.yml b/.github/workflows/lint.db.yml new file mode 100644 index 00000000..76042606 --- /dev/null +++ b/.github/workflows/lint.db.yml @@ -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/ diff --git a/.github/workflows/lint.frontend.yml b/.github/workflows/lint.frontend.yml new file mode 100644 index 00000000..07d1c3d0 --- /dev/null +++ b/.github/workflows/lint.frontend.yml @@ -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 diff --git a/.github/workflows/locust.yml b/.github/workflows/locust.yml new file mode 100644 index 00000000..175bf0ec --- /dev/null +++ b/.github/workflows/locust.yml @@ -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 diff --git a/crawlers/setup.py b/crawlers/setup.py index e64e9b30..07c2277a 100644 --- a/crawlers/setup.py +++ b/crawlers/setup.py @@ -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", diff --git a/db/requirements.txt b/db/requirements.txt deleted file mode 100644 index 3440a5b4..00000000 Binary files a/db/requirements.txt and /dev/null differ