Re add toplevel py.typed file #258
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint tests | |
on: | |
push: | |
branches-ignore: | |
- 'release/*' | |
pull_request: | |
env: | |
# Set variable to 'main' if your change will not affect Contrib. | |
# Otherwise, set variable to the commit of your branch on | |
# opentelemetry-python-contrib which is compatible with these Core repo | |
# changes. | |
CONTRIB_REPO_SHA: 06021a6d1557f79cc292784eff24c718e54f09fb | |
# This is needed because we do not clone the core repo in contrib builds anymore. | |
# When running contrib builds as part of core builds, we use actions/checkout@v4 which | |
# does not set an environment variable (simply just runs tox), which is different when | |
# contrib builds are run directly from contrib (since test.yml is executed, which sets CORE_REPO_SHA) | |
# The solution is to include CORE_REPO_SHA as part of THIS environment so it can be accessed | |
# from within the contrib build. | |
CORE_REPO_SHA: ${{ github.sha }} | |
# See #3879 and https://pip.pypa.io/en/stable/cli/pip/#exists-action-option | |
PIP_EXISTS_ACTION: w | |
jobs: | |
lint-3_12: | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
package: | |
- "opentelemetry-api" | |
- "opentelemetry-proto" | |
- "opentelemetry-sdk" | |
- "opentelemetry-semantic-conventions" | |
- "opentelemetry-getting-started" | |
- "opentelemetry-opentracing-shim" | |
- "opentelemetry-opencensus-shim" | |
- "opentelemetry-exporter-opencensus" | |
- "opentelemetry-exporter-otlp-proto-common" | |
- "opentelemetry-exporter-otlp-combined" | |
- "opentelemetry-exporter-otlp-proto-grpc" | |
- "opentelemetry-exporter-otlp-proto-http" | |
- "opentelemetry-exporter-otlp-proto-prometheus" | |
- "opentelemetry-exporter-otlp-proto-zipkin-combined" | |
- "opentelemetry-exporter-otlp-proto-zipkin-proto-http" | |
- "opentelemetry-exporter-otlp-proto-zipkin-json" | |
- "opentelemetry-propagator-b3" | |
- "opentelemetry-propagator-jaeger" | |
- "opentelemetry-test-utils" | |
os: [ubuntu-20.04] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Core Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install tox | |
run: pip install tox | |
- name: Cache tox environment | |
# Preserves .tox directory between runs for faster installs | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.tox | |
~/.cache/pip | |
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} | |
- name: run tox | |
run: tox -e lint-${{ matrix.package }} |