Skip to content

Commit 453963e

Browse files
committed
Run tests on Windows in Github Actions
1 parent c6976fc commit 453963e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
python-version: [ py36, py37, py38, py39, pypy3 ]
2626
package: ["instrumentation", "exporter", "sdkextension", "propagator"]
27-
os: [ ubuntu-latest ]
27+
os: [ ubuntu-latest, windows-latest ]
2828
steps:
2929
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
3030
uses: actions/checkout@v2
@@ -48,18 +48,25 @@ jobs:
4848
.tox
4949
~/.cache/pip
5050
key: v4-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
51+
# tox fails on windows and Python3.6 when tox dir is reused between builds so we remove it
52+
- name: fix for windows + py3.6
53+
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == 'py36' }}
54+
shell: pwsh
55+
run: Remove-Item .\.tox\ -Force -Recurse -ErrorAction Ignore
5156
- name: run tox
5257
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
5358
- name: Find and merge benchmarks
59+
# TODO: fix and enable on windows
5460
# TODO: Add at least one benchmark to every package type to remove this (#249)
55-
if: matrix.package == 'sdkextension'
61+
if: ${{ matrix.package == 'sdkextension' && matrix.os != 'windows-latest' }}
5662
run: >-
5763
jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
5864
| if .[0].benchmarks == null then null else .[0] end'
5965
**/**/tests/*${{ matrix.package }}*-benchmark.json > output.json
6066
- name: Report on benchmark results
67+
# TODO: fix and enable on windows
6168
# TODO: Add at least one benchmark to every package type to remove this (#249)
62-
if: matrix.package == 'sdkextension'
69+
if: ${{ matrix.package == 'sdkextension' && matrix.os != 'windows-latest' }}
6370
uses: rhysd/github-action-benchmark@v1
6471
with:
6572
name: OpenTelemetry Python Benchmarks - Python ${{ env[matrix.python-version ]}} - ${{ matrix.package }}

0 commit comments

Comments
 (0)