10
10
# Otherwise, set variable to the commit of your branch on
11
11
# opentelemetry-python-contrib which is compatible with these Core repo
12
12
# changes.
13
- CONTRIB_REPO_SHA : 3ad534cbba41c2b92618f5f03c4c92cee4a72df6
13
+ CONTRIB_REPO_SHA : dde62cebffe519c35875af6d06fae053b3be65ec
14
14
15
15
jobs :
16
16
build :
@@ -20,15 +20,15 @@ jobs:
20
20
py37 : 3.7
21
21
py38 : 3.8
22
22
py39 : 3.9
23
- pypy3 : pypy3
23
+ pypy3 : pypy-3.7
24
24
RUN_MATRIX_COMBINATION : ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
25
25
runs-on : ${{ matrix.os }}
26
26
strategy :
27
27
fail-fast : false # ensures the entire test matrix is run, even if one permutation fails
28
28
matrix :
29
29
python-version : [ py36, py37, py38, py39, pypy3 ]
30
30
package : ["instrumentation", "core", "exporter", "propagator"]
31
- os : [ ubuntu-latest ]
31
+ os : [ ubuntu-20.04, windows-2019 ]
32
32
steps :
33
33
- name : Checkout Core Repo @ SHA - ${{ github.sha }}
34
34
uses : actions/checkout@v2
@@ -42,14 +42,22 @@ jobs:
42
42
uses : actions/setup-python@v2
43
43
with :
44
44
python-version : ${{ env[matrix.python-version] }}
45
+ architecture : ' x64'
45
46
- name : Install tox
46
47
run : pip install -U tox-factor
47
48
- name : Cache tox environment
48
49
# Preserves .tox directory between runs for faster installs
49
50
uses : actions/cache@v2
50
51
with :
51
- path : .tox
52
- key : tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
52
+ path : |
53
+ .tox
54
+ ~/.cache/pip
55
+ key : v2-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
56
+ # tox fails on windows and Python3.6 when tox dir is reused between builds so we remove it
57
+ - name : fix for windows + py3.6
58
+ if : ${{ matrix.os == 'windows-2019' && matrix.python-version == 'py36' }}
59
+ shell : pwsh
60
+ run : Remove-Item .\.tox\ -Force -Recurse -ErrorAction Ignore
53
61
- name : run tox
54
62
run : tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
55
63
- name : Find and merge benchmarks
81
89
matrix :
82
90
tox-environment : [ "docker-tests", "lint", "docs", "mypy", "mypyinstalled", "tracecontext" ]
83
91
name : ${{ matrix.tox-environment }}
84
- runs-on : ubuntu-latest
92
+ runs-on : ubuntu-20.04
85
93
steps :
86
94
- name : Checkout Core Repo @ SHA - ${{ github.sha }}
87
95
uses : actions/checkout@v2
@@ -95,14 +103,17 @@ jobs:
95
103
uses : actions/setup-python@v2
96
104
with :
97
105
python-version : 3.9
106
+ architecture : ' x64'
98
107
- name : Install tox
99
108
run : pip install -U tox
100
109
- name : Cache tox environment
101
110
# Preserves .tox directory between runs for faster installs
102
111
uses : actions/cache@v2
103
112
with :
104
- path : .tox
105
- key : tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
113
+ path : |
114
+ .tox
115
+ ~/.cache/pip
116
+ key : v2-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
106
117
- name : run tox
107
118
run : tox -e ${{ matrix.tox-environment }}
108
119
contrib-build :
@@ -119,7 +130,7 @@ jobs:
119
130
matrix :
120
131
python-version : [ py36, py37, py38, py39, pypy3 ]
121
132
package : ["instrumentation", "exporter"]
122
- os : [ ubuntu-latest ]
133
+ os : [ ubuntu-20.04 ]
123
134
steps :
124
135
- name : Checkout Contrib Repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
125
136
uses : actions/checkout@v2
@@ -135,14 +146,17 @@ jobs:
135
146
uses : actions/setup-python@v2
136
147
with :
137
148
python-version : ${{ env[matrix.python-version] }}
149
+ architecture : ' x64'
138
150
- name : Install tox
139
151
run : pip install -U tox-factor
140
152
- name : Cache tox environment
141
153
# Preserves .tox directory between runs for faster installs
142
154
uses : actions/cache@v2
143
155
with :
144
- path : .tox
145
- key : tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
156
+ path : |
157
+ .tox
158
+ ~/.cache/pip
159
+ key : v2-tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
146
160
- name : run tox
147
161
run : tox -f ${{ matrix.python-version }}-${{ matrix.package }}
148
162
contrib-misc :
@@ -151,7 +165,7 @@ jobs:
151
165
matrix :
152
166
tox-environment : [ "docker-tests"]
153
167
name : ${{ matrix.tox-environment }}
154
- runs-on : ubuntu-latest
168
+ runs-on : ubuntu-20.04
155
169
steps :
156
170
- name : Checkout Contrib Repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
157
171
uses : actions/checkout@v2
@@ -167,13 +181,16 @@ jobs:
167
181
uses : actions/setup-python@v2
168
182
with :
169
183
python-version : 3.9
184
+ architecture : ' x64'
170
185
- name : Install tox
171
186
run : pip install -U tox
172
187
- name : Cache tox environment
173
188
# Preserves .tox directory between runs for faster installs
174
189
uses : actions/cache@v2
175
190
with :
176
- path : .tox
177
- key : tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
191
+ path : |
192
+ .tox
193
+ ~/.cache/pip
194
+ key : v2-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
178
195
- name : run tox
179
196
run : tox -e ${{ matrix.tox-environment }}
0 commit comments