-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.05 KB
/
test_metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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/