From dc08573174ac7ddc2fb31f93d8ca5bbc8c77bd6f Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 3 Aug 2021 12:22:06 +0000 Subject: [PATCH] Github workflows --- .github/workflows/lint.backend.yml | 25 ++++++++++++++++++++++ .github/workflows/lint.crawlers.yml | 25 ++++++++++++++++++++++ .github/workflows/lint.db.yml | 25 ++++++++++++++++++++++ .github/workflows/lint.frontend.yml | 21 ++++++++++++++++++ .github/workflows/locust.yml | 32 ++++++++++++++++++++++++++++ crawlers/setup.py | 2 +- db/requirements.txt | Bin 700 -> 0 bytes 7 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.backend.yml create mode 100644 .github/workflows/lint.crawlers.yml create mode 100644 .github/workflows/lint.db.yml create mode 100644 .github/workflows/lint.frontend.yml create mode 100644 .github/workflows/locust.yml delete mode 100644 db/requirements.txt 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 3440a5b4e1d9565cb795d895f8809f074e049489..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 700 zcmZ{i!A`~-eb^vp>10qd!aBttQK?O|6)M@55=>}JK>NJLJg zp&1i0mtxHZiMfZdUMWt8nSbkR|CbWoC$Ei^avn;u;a&!v0u5CxxeHg*c0u*M^fwS$ ztnJmF?FkQC-08JMVv)Aogdfdr2dCOyS!S=9?M83mPj4)t*E9Wy!~gT1jfzq&><176 BWPtzx