6
6
branches : [master]
7
7
8
8
jobs :
9
- sphinx :
10
- runs-on : ubuntu-latest
11
- steps :
12
- - uses : actions/checkout@v2
13
- - name : Setup python 3.10
14
- uses : actions/setup-python@v2
15
- with :
16
- python-version : " 3.10"
17
- - name : Cache Python dependencies
18
- uses : actions/cache@v2
19
- with :
20
- path : ~/.cache/pip
21
- key : ${{ runner.os }}-pip-${{ hashFiles('requirements/3.10.txt') }}
22
- restore-keys : |
23
- ${{ runner.os }}-pip-
24
- ${{ runner.os }}-
25
- - name : Install Python dependencies
26
- run : |
27
- python -m pip install --upgrade pip
28
- pip install wheel
29
- pip install -r requirements/3.10.txt
30
- - name : Build documentation
31
- run : sphinx-build -nW . docs/_build
32
- - name : Run doctests
33
- run : sphinx-build -b doctest . docs/_build
34
-
35
9
build :
36
10
strategy :
37
11
fail-fast : false
41
15
- " 3.8"
42
16
- " 3.9"
43
17
- " 3.10"
44
- test- component :
18
+ component :
45
19
- arangodb
46
20
- azurite
47
21
- clickhouse
85
59
pip install --upgrade pip
86
60
pip install -r requirements/${{ matrix.python-version }}.txt
87
61
- name : Run docker diagnostics
88
- if : matrix.test- component == 'core'
62
+ if : matrix.component == 'core'
89
63
run : |
90
64
echo "Build minimal container for docker-in-docker diagnostics"
91
65
docker build -f Dockerfile.diagnostics -t testcontainers-python .
@@ -96,13 +70,13 @@ jobs:
96
70
echo "Container diagnostics with host network"
97
71
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --network=host testcontainers-python python diagnostics.py
98
72
- name : Lint the code
99
- run : make ${{ matrix.test- component }}/lint
73
+ run : make ${{ matrix.component }}/lint
100
74
- name : Run tests
101
- if : matrix.test- component != 'meta'
102
- run : make ${{ matrix.test- component }}/tests
75
+ if : matrix.component != 'meta'
76
+ run : make ${{ matrix.component }}/tests
103
77
- name : Build the package
104
- run : make ${{ matrix.test- component }}/dist
105
- - name : Publish the package to pypi
78
+ run : make ${{ matrix.component }}/dist
79
+ - name : Upload the package to pypi
106
80
if : >
107
81
github.event_name == 'push'
108
82
&& github.ref == 'refs/heads/master'
111
85
env :
112
86
TWINE_USERNAME : __token__
113
87
TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
114
- TWINE_REPOSITORY : pypi
115
- run : make ${{ matrix.test-component }}/publish
88
+ run : make ${{ matrix.component }}/upload
0 commit comments