* instructions for running without kubernetes ('monolithic mode') * added docker instructions * chore: remove pgsql as hard dependency * chore: update deps * docs: updated docs to remove local pg engine for docker install * docs: reword docs * ci: update poetry source * fix: refactor tests for mypy * fix: search miner for eth2 * feat: improve eth2 miner fn * refactor: unnecessary comma * test: add miner generation tests --------- Co-authored-by: pintail <you@example.com>
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: Python package
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Get full Python version
|
|
id: full-python-version
|
|
shell: bash
|
|
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
|
|
|
|
- name: Bootstrap poetry
|
|
shell: bash
|
|
run: |
|
|
curl -sSL https://install.python-poetry.org \
|
|
| python - -y
|
|
|
|
- name: Update PATH
|
|
if: ${{ matrix.os != 'Windows' }}
|
|
shell: bash
|
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
- name: Configure poetry
|
|
shell: bash
|
|
run: poetry config virtualenvs.in-project true
|
|
|
|
- name: Set up cache
|
|
uses: actions/cache@v2
|
|
id: cache
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Ensure cache is healthy
|
|
if: steps.cache.outputs.cache-hit == 'true'
|
|
shell: bash
|
|
run: timeout 10s poetry run pip --version || rm -rf .venv
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: poetry install
|
|
|
|
- name: Run precommit
|
|
run: |
|
|
poetry run pre-commit run --all-files
|
|
|
|
- name: Test with pytest
|
|
shell: bash
|
|
run: poetry run pytest --cov=mev_inspect tests
|