Skip to content

Commit

Permalink
ci: add docker compose
Browse files Browse the repository at this point in the history
Signed-off-by: Far <OS@Noutbuk-admin.local>
  • Loading branch information
AlexStroke authored and Far committed Sep 26, 2024
1 parent 3e4b412 commit fbad358
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,46 @@ jobs:
git diff --quiet
pytest:
runs-on: iroha-ubuntu-latest
container: rust:1.65-buster
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Iroha code
uses: actions/checkout@v4
with:
repository: 'hyperledger/iroha'
ref: '2.0.0-pre-rc.22'
- name: Run docker-compose.yml containers
run: |
docker compose -f ./configs/swarm/docker-compose.yml up --wait || exit 1
- name: Checkout code
uses: actions/checkout@v4
- name: Show containers and directory
run: |
docker ps -a
pwd
ls
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
clang \
git \
patchelf \
llvm-dev \
python3-pip
pip3 install --upgrade pip
pip3 install maturin pytest
- name: Install iroha2
run: maturin build && pip3 install target/wheels/*
- name: Pytest
working-directory: tests
run: pytest
sudo pip3 install --upgrade pip
sudo pip3 install maturin pytest
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "export PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
- name: Maturin build
run: maturin build && poetry add target/wheels/*
- name: Poetry install
run: poetry install
- name: Run test
run: poetry run python -m pytest tests

integration-test:
runs-on: iroha-ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion how_to_test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
maturin build
poetry add target/wheels/iroha-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
poetry add target/wheels/*
poetry install
poetry run python -m pytest tests --alluredir allure-results
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,4 @@ python = "^3.9.6"
pytest = "^8.1.1"
faker = "^24.4.0"
allure-pytest = "^2.13.5"
#iroha = {path = "target/wheels/iroha-0.1.0-cp39-cp39-macosx_11_0_arm64.whl"}
#iroha = {path = "target/wheels/iroha-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl"}
maturin = "^1.7.0"
iroha = {path = "target/wheels/iroha-0.1.0-cp312-cp312-macosx_11_0_arm64.whl"}
maturin = "^1.7.0"

0 comments on commit fbad358

Please sign in to comment.