Merge pull request #79 from skalenetwork/update-compose-cmd #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test metrics | |
on: [push, pull_request] | |
jobs: | |
test_proxy: | |
defaults: | |
run: | |
working-directory: metrics | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.12] | |
env: | |
ETH_ENDPOINT: ${{ secrets.ETH_ENDPOINT }} | |
PYTHONPATH: ${{ github.workspace }}/metrics | |
MYSQL_USER: test | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_DATABASE: metrics | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install python dependencies | |
run: pip install -r requirements.txt && pip install -r requirements-dev.txt | |
- name: Lint with ruff | |
run: ruff check src/ | |
- name: Run MySQL container | |
run: docker compose up -d db | |
- name: Prepare database | |
run: python tests/prepare_db.py | |
- name: Run metrics tests | |
run: pytest tests/ |