Skip to content

Bump pytest from 7.4.4 to 8.1.1 #15

Bump pytest from 7.4.4 to 8.1.1

Bump pytest from 7.4.4 to 8.1.1 #15

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Python CI
on:
push:
branches: [main, 1.x]
pull_request:
workflow_dispatch:
jobs:
build-and-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry
- name: Cache Poetry virtual environment
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
poetry install
- name: Lint with flake8
run: |
poetry run flake8 .
unit:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry
- name: Cache Poetry virtual environment
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
poetry install
- name: Run unit tests
run: |
poetry run python3 test.py tests/unit
integration:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run docker in background
run: |
docker run --detach --rm --name rippled-service -p 6006:6006 --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s transia/hooksv3d-standalone:latest
- name: Install Poetry
run: |
pip install poetry
- name: Cache Poetry virtual environment
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
poetry install
- run: npm install -g c2wasm-cli
- run: c2wasm-cli contracts build
- name: Run integration tests
run: |
# Add commands to run integration tests here
poetry run python3 test.py tests/integration
- name: Stop docker container
if: always()
run: docker stop rippled-service