diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8181f82a..2b6e0eef1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,8 +44,10 @@ jobs: # Preserves .tox directory between runs for faster installs uses: actions/cache@v2 with: - path: .tox - key: v2-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} + path: | + .tox + ~/.cache/pip + key: v4-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} - name: run tox run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json - name: Find and merge benchmarks @@ -94,12 +96,17 @@ jobs: python-version: 3.9 - name: Install tox run: pip install -U tox + - name: Install libsnappy-dev + if: ${{ matrix.tox-environment == 'lint' }} + run: sudo apt-get install -y libsnappy-dev - name: Cache tox environment # Preserves .tox directory between runs for faster installs uses: actions/cache@v2 with: - path: .tox - key: v2-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt', 'gen-requirements.txt', 'docs-requirements.txt') }} + path: | + .tox + ~/.cache/pip + key: v4-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt', 'gen-requirements.txt', 'docs-requirements.txt') }} - name: run tox run: tox -e ${{ matrix.tox-environment }} - name: Ensure generated code is up to date diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..11aaa0686 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.9.5 diff --git a/dev-requirements.txt b/dev-requirements.txt index 75b9ed793..2bb9e3214 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -pylint~=2.6 +pylint<2.10 flake8~=3.7 isort~=5.6 black>=19.3b0,==19.* diff --git a/tox.ini b/tox.ini index ddb892930..50fca6d6b 100644 --- a/tox.ini +++ b/tox.ini @@ -345,7 +345,6 @@ deps = httpretty commands_pre = - sudo apt-get install libsnappy-dev python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-api python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-semantic-conventions python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation[test]