Skip to content

Merge pull request #89 from RnDAO/hivemind #207

Merge pull request #89 from RnDAO/hivemind

Merge pull request #89 from RnDAO/hivemind #207

Workflow file for this run

name: Build & Test
on:
pull_request:
push:
branches: [main, development]
jobs:
build:
runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python # ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10" # ${{ matrix.python-version }}
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ secrets.DAOLYTICS_ACCESS_TOKEN }}
run: |
pip install --upgrade pip
pip install ruff pytest
pip install -r tc-DAOlytics-operation/requirements.txt
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 --per-file-ignores="__init__.py:F401" .
- name: Run tests
env:
MONGODB_USER: user
MONGODB_HOST: mongod
MONGODB_NAME: database
MONGODB_PORT: 1547
MONGODB_PASS: password
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: password
NEO4J_PROTOCOL: bolt
NEO4J_HOST: neo4j
NEO4J_PORT: 7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: password
NEO4J_DB: neo4j
RABBIT_HOST: localhost
RABBIT_PORT: 5672
RABBIT_USER: guest
RABBIT_PASSWORD: guest
SAGA_DB_NAME: Saga
SAGA_DB_COLLECTION: saga
SENTRY_DSN: some_url
SENTRY_ENV: local
run: |
coverage run --omit=tc-DAOlytics-operation/tests/* -m pytest tc-DAOlytics-operation/tests