Skip to content

Commit

Permalink
ci: improve pytest workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Far <OS@Noutbuk-admin.local>
  • Loading branch information
aleksandrstrokov authored and SamHSmith committed Sep 26, 2024
1 parent d3648a2 commit 5a6369a
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.12 ]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
- name: Checkout Iroha code
uses: actions/checkout@v4
with:
Expand All @@ -51,34 +61,19 @@ jobs:
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: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
clang \
git \
patchelf \
llvm-dev \
python3-pip
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: |
pip install maturin
maturin build
poetry add target/wheels/*
- name: Install project dependencies
run: poetry install
- name: Run test
run: poetry run python -m pytest tests
- name: Run tests
run: poetry run pytest tests
- name: Tear down Docker containers
if: always()
run: |
docker stop $(docker ps -q) && docker rm $(docker ps -a -q)
integration-test:
runs-on: iroha-ubuntu-latest
Expand Down

0 comments on commit 5a6369a

Please sign in to comment.