feat: open telemetry traces setup #4569
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 | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
push: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 1 | |
PIP_PROGRESS_BAR: off | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: '3.12' | |
- name: Install libsnappy-dev | |
run: sudo apt install libsnappy-dev | |
- run: pip install pre-commit | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- run: pre-commit run --all-files --show-diff-on-failure | |
type-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Need fetch-depth 0 to fetch tags, see https://github.com/actions/checkout/issues/701 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: '3.12' | |
- name: Gather context | |
id: ctx | |
run: | | |
echo is_release=${{ contains(github.ref, 'refs/tags/') }} | tee -a $GITHUB_OUTPUT | |
echo is_dev=${{ ! contains(github.ref, 'refs/tags/') }} | tee -a $GITHUB_OUTPUT | |
echo version=$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g') | |
- name: Resolve Karapace version | |
run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV | |
- run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV | |
- run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV | |
- name: Run mypy | |
run: make type-check-mypy-in-docker | |
env: | |
KV: ${{ steps.ctx.outputs.version }} | |
PYTHON_VERSION: 3.12 | |
KARAPACE_VERSION: ${{ env.KARAPACE_VERSION }} | |
RUNNER_UID: ${{ env.RUNNER_UID }} | |
RUNNER_GID: ${{ env.RUNNER_GID }} |