Skip to content

Introduce ctr_client fixture, add --ctr-exe CLI arg #2298

Introduce ctr_client fixture, add --ctr-exe CLI arg

Introduce ctr_client fixture, add --ctr-exe CLI arg #2298

Workflow file for this run

name: Run tests
on:
push:
branches:
- master
pull_request: {}
jobs:
build-linux-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup
run: |
pip install -U pip wheel
pip install -e ./
pip install -r lint-requirements.txt
- name: Run all checks
run: |
flake8
isort --check ./
black --check ./
build-linux-test-component:
strategy:
fail-fast: false
matrix:
component:
- buildx
- test_compose.py
- test_config.py
- test_container.py
- test_context.py
- test_image.py
- test_manifest.py
- test_network.py
- test_node.py
- test_plugin.py
- test_service.py
- test_stack.py
- test_swarm.py
- test_system.py
- test_task.py
- test_volume.py
pydantic-version:
- pydantic==1.9
- pydantic==2.*
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup
run: |
./scripts/ci-setup.sh
pip install --upgrade ${{ matrix.pydantic-version }}
- name: Run tests
run: |
python -m pytest -vv --durations=10 tests/python_on_whales/components/${{ matrix.component }}
build-linux-test-other:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup
run: |
./scripts/ci-setup.sh
- name: Run tests
run: |
python -m pytest -vv --durations=10 --ignore=tests/python_on_whales/components/
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Setup
run: |
docker info
docker run hello-world
pip install -U pip wheel
pip install -e ./
pip install -r tests/test-requirements.txt
- name: Run single test
run: |
python -m pytest -vv tests/python_on_whales/components/test_volume.py::test_simple_volume
# cost too much at the moment.
# build-macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.8
# - name: Setup
# run: |
# mkdir -p ~/.docker/machine/cache
# curl -Lo ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso
# brew install docker docker-machine
# docker-machine create --driver virtualbox default
# docker-machine env default
# eval "$(docker-machine env default)"
# docker info
# docker run hello-world
# pip install -U pip wheel
# pip install -e ./
# pip install -r tests/test-requirements.txt
# - name: Run all tests
# run: |
# python -m pytest -vv tests/