|
5 | 5 | test: |
6 | 6 | runs-on: ubuntu-latest |
7 | 7 | env: |
8 | | - ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }} |
9 | | - ENDPOINT: ${{ secrets.ENDPOINT }} |
10 | 8 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
11 | | - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} |
12 | | - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
13 | | - DB_PASSWORD: ${{ secrets.DB_PASSWORD }} |
14 | | - DB_USER: ${{ secrets.DB_USER }} |
15 | | - DB_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }} |
16 | | - DB_PORT: ${{ secrets.DB_PORT }} |
17 | | - MANAGER_TAG: "1.9.3-beta.0" |
18 | 9 |
|
19 | 10 | steps: |
20 | | - - uses: actions/checkout@v2 |
21 | | - with: |
22 | | - submodules: true |
23 | | - - name: Set up Python 3.11 |
24 | | - uses: actions/setup-python@v1 |
25 | | - with: |
26 | | - python-version: 3.11 |
27 | | - - name: Install deps |
28 | | - run: | |
29 | | - sudo apt-get update |
30 | | - sudo apt-get install -y libmysqlclient-dev build-essential |
31 | | - - name: Install python dependencies |
32 | | - run: | |
33 | | - python -m pip install --upgrade pip |
34 | | - pip install -r requirements.txt |
35 | | - pip install -r requirements-dev.txt |
36 | | - - name: Lint with flake8 |
37 | | - run: | |
38 | | - flake8 . |
39 | | - - name: Deploy manager contracts and run MySQL container |
40 | | - run: | |
41 | | - # |
42 | | - bash ./scripts/create_environment.sh |
43 | | - - name: Run tests |
44 | | - run: | |
45 | | - export PYTHONPATH=$PYTHONPATH:. |
46 | | - python tests/prepare_validator.py |
47 | | - ENV=DEV py.test -v -s --cov=./ tests/ --cov-report term-missing |
48 | | - - name: Codecov |
49 | | - run: | |
50 | | - codecov -t $CODECOV_TOKEN |
| 11 | + - uses: actions/checkout@v5 |
| 12 | + with: |
| 13 | + submodules: true |
| 14 | + - name: Set up Python 3.13 |
| 15 | + uses: actions/setup-python@v5 |
| 16 | + with: |
| 17 | + python-version: 3.13 |
| 18 | + |
| 19 | + - name: Install deps |
| 20 | + run: | |
| 21 | + sudo apt-get update |
| 22 | + sudo apt-get install -y build-essential |
| 23 | +
|
| 24 | + - name: Install uv |
| 25 | + uses: astral-sh/setup-uv@v5 |
| 26 | + with: |
| 27 | + enable-cache: true |
| 28 | + - name: Set up Python 3.13 |
| 29 | + run: uv python install 3.13 |
| 30 | + |
| 31 | + - name: Install python dependencies |
| 32 | + run: uv sync --all-extras --prerelease=allow |
| 33 | + |
| 34 | + - name: Checking formatting with ruff |
| 35 | + run: uv run ruff check |
| 36 | + |
| 37 | + - name: Type check with mypy |
| 38 | + run: uv run mypy . |
| 39 | + |
| 40 | + - name: Export env |
| 41 | + run: | |
| 42 | + . ./scripts/export_env.sh |
| 43 | + printenv >> $GITHUB_ENV |
| 44 | +
|
| 45 | + - name: Deploy skale manager |
| 46 | + run: | |
| 47 | + export ETH_PRIVATE_KEY=$(cat helper-scripts/private_key.txt) |
| 48 | + bash helper-scripts/deploy_manager.sh |
| 49 | +
|
| 50 | + - name: Run tests |
| 51 | + run: bash scripts/run_tests.sh |
| 52 | + |
| 53 | + - name: Codecov |
| 54 | + run: | |
| 55 | + uv run codecov -t $CODECOV_TOKEN |
0 commit comments