mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 12:43:39 +08:00
Fix tox lint command (#623)
* Fix tox lint command - Move apt-get install command to github actions to run on an ubuntu system only. This keeps tox.ini cross-platform and enabled to run on non-ubuntu systems locally. - Add `-y` flag to apt-get install command so it does not wait for configuration on CI. * Downgrade pylint to 2.9.x * Add pip cache to github actions cache
This commit is contained in:
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
@ -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
|
||||
|
1
.python-version
Normal file
1
.python-version
Normal file
@ -0,0 +1 @@
|
||||
3.9.5
|
@ -1,4 +1,4 @@
|
||||
pylint~=2.6
|
||||
pylint<2.10
|
||||
flake8~=3.7
|
||||
isort~=5.6
|
||||
black>=19.3b0,==19.*
|
||||
|
1
tox.ini
1
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]
|
||||
|
Reference in New Issue
Block a user