-
Notifications
You must be signed in to change notification settings - Fork 103
121 lines (115 loc) · 3.37 KB
/
python-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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 --no-runtime-skip --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 --no-runtime-skip --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 --no-runtime-skip -m "not podman" 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 --no-runtime-skip -m "not podman" tests/