Commit b53c0af 1 parent 8d273e1 commit b53c0af Copy full SHA for b53c0af
File tree 5 files changed +64
-13
lines changed
5 files changed +64
-13
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive
7
7
ENV PY36=3.6.15 \
8
8
PY38=3.8.6 \
9
9
PY39=3.9.2 \
10
+ PY310=3.10.16 \
10
11
PY312=3.12.3 \
11
12
PY313=3.13.0 \
12
13
CMAKE_3_15=/usr/share/cmake-3.15.7/bin/cmake \
@@ -95,6 +96,7 @@ RUN curl https://pyenv.run | bash && \
95
96
pyenv install $PY36 && \
96
97
pyenv install $PY38 && \
97
98
pyenv install $PY39 && \
99
+ pyenv install $PY310 && \
98
100
pyenv install $PY312 && \
99
101
pyenv install $PY313 && \
100
102
pyenv global $PY39 && \
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Linux tests
2
2
3
3
on :
4
4
workflow_call :
5
+ inputs :
6
+ python-versions :
7
+ required : true
8
+ type : string
5
9
6
10
jobs :
7
11
build_container :
49
53
options : --user conan
50
54
strategy :
51
55
matrix :
52
- python-version : [3.13, 3.9, 3.8, 3.6]
56
+ python-version : ${{ fromJson(inputs.python-versions) }}
53
57
test-type : [unittests, integration, functional]
54
58
include :
55
59
- test-type : unittests
@@ -92,19 +96,30 @@ jobs:
92
96
linux_docker_tests :
93
97
needs : build_container
94
98
runs-on : ubuntu-latest
99
+ container :
100
+ image : ghcr.io/${{ github.repository_owner }}/conan-tests:${{ needs.build_container.outputs.image_tag }}
101
+ options : --user conan
95
102
strategy :
96
103
matrix :
97
- python-version : [3.13, 3.9]
104
+ # Use modern versions due to docker incompatibility with python <3.8
105
+ python-version : ${{ github.event_name != 'pull_request' && fromJson('["3.13", "3.9"]') || fromJson('["3.10"]') }}
106
+
98
107
name : Docker Runner Tests (${{ matrix.python-version }})
99
108
steps :
100
- - name : Set up Python ${{ matrix.python-version }}
101
- uses : actions/setup-python@v5
102
- with :
103
- python-version : ${{ matrix.python-version }}
104
-
105
109
- name : Checkout code
106
110
uses : actions/checkout@v4
107
111
112
+ - name : Set up Python ${{ matrix.python-version }}
113
+ run : |
114
+ pyenv global ${{ matrix.python-version }}
115
+ python --version
116
+
117
+ - name : Cache pip
118
+ uses : actions/cache@v4
119
+ with :
120
+ path : ~/.cache/pip
121
+ key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
122
+
108
123
- name : Install dependencies
109
124
run : |
110
125
pip install --upgrade pip
Original file line number Diff line number Diff line change @@ -16,17 +16,44 @@ concurrency:
16
16
cancel-in-progress : true
17
17
18
18
jobs :
19
+ set_python_versions :
20
+ runs-on : ubuntu-latest
21
+ outputs :
22
+ python_versions_linux_windows : ${{ steps.set_versions.outputs.python_versions_linux_windows }}
23
+ python_versions_macos : ${{ steps.set_versions.outputs.python_versions_macos }}
24
+ name : Determine Python versions
25
+ steps :
26
+ - name : Determine Python versions
27
+ id : set_versions
28
+ run : |
29
+ if [[ "${{ github.ref }}" == "refs/heads/develop2" || "${{ github.ref }}" == refs/heads/release/* ]]; then
30
+ echo "python_versions_linux_windows=['3.13', '3.6']" >> $GITHUB_OUTPUT
31
+ echo "python_versions_macos=['3.13', '3.8']" >> $GITHUB_OUTPUT
32
+ else
33
+ echo "python_versions_linux_windows=['3.10']" >> $GITHUB_OUTPUT
34
+ echo "python_versions_macos=['3.10']" >> $GITHUB_OUTPUT
35
+ fi
36
+
19
37
linux_suite :
38
+ needs : set_python_versions
20
39
uses : ./.github/workflows/linux-tests.yml
21
40
name : Linux test suite
41
+ with :
42
+ python-versions : ${{ needs.set_python_versions.outputs.python_versions_linux_windows }}
22
43
23
44
osx_suite :
45
+ needs : set_python_versions
24
46
uses : ./.github/workflows/osx-tests.yml
25
47
name : OSX test suite
48
+ with :
49
+ python-versions : ${{ needs.set_python_versions.outputs.python_versions_macos }}
26
50
27
51
windows_suite :
52
+ needs : set_python_versions
28
53
uses : ./.github/workflows/win-tests.yml
29
54
name : Windows test suite
55
+ with :
56
+ python-versions : ${{ needs.set_python_versions.outputs.python_versions_linux_windows }}
30
57
31
58
code_coverage :
32
59
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: OSX Tests
2
2
3
3
on :
4
4
workflow_call :
5
+ inputs :
6
+ python-versions :
7
+ required : true
8
+ type : string
5
9
6
10
jobs :
7
11
osx_setup :
@@ -11,10 +15,10 @@ jobs:
11
15
- name : Checkout code
12
16
uses : actions/checkout@v4
13
17
14
- - name : Set up Python 3.8
18
+ - name : Set up Python
15
19
uses : actions/setup-python@v5
16
20
with :
17
- python-version : 3.8
21
+ python-version : ' 3.10 '
18
22
19
23
- name : Cache pip packages
20
24
id : cache-pip
@@ -114,7 +118,7 @@ jobs:
114
118
strategy :
115
119
fail-fast : true
116
120
matrix :
117
- python-version : [3.8, 3.12, 3.13]
121
+ python-version : ${{ fromJson(inputs.python-versions) }}
118
122
test-type : [unittests, integration, functional]
119
123
include :
120
124
- test-type : unittests
Original file line number Diff line number Diff line change @@ -2,13 +2,17 @@ name: Windows Tests
2
2
3
3
on :
4
4
workflow_call :
5
+ inputs :
6
+ python-versions :
7
+ required : true
8
+ type : string
5
9
6
10
jobs :
7
11
unit_integration_tests :
8
12
runs-on : windows-2022
9
13
strategy :
10
14
matrix :
11
- python-version : [3.13, 3.8, 3.6]
15
+ python-version : ${{ fromJson(inputs.python-versions) }}
12
16
name : Unit & Integration Tests (${{ matrix.python-version }})
13
17
steps :
14
18
- name : Checkout code
59
63
runs-on : windows-2022
60
64
strategy :
61
65
matrix :
62
- python-version : [3.13, 3.8, 3.6]
63
-
66
+ python-version : ${{ fromJson(inputs.python-versions) }}
64
67
name : Functional Tests (${{ matrix.python-version }})
65
68
steps :
66
69
- name : Checkout code
You can’t perform that action at this time.
0 commit comments