build(deps): bump opentelemetry-distro from 0.41b0 to 0.43b0 in /python-example #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: Python CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
paths: | |
- '.github/workflows/python.yml' | |
- 'python-example/**' | |
jobs: | |
build_and_run_python_app: | |
runs-on: ubuntu-latest | |
env: | |
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python | |
strategy: | |
matrix: | |
python-version: [ 3.8, 3.9, '3.10' ] | |
name: Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r python-example/requirements.txt | |
pip3 install opentelemetry-instrumentation-flask | |
- name: Run the app | |
run: | | |
python3 python-example/server.py & | |
- name: Send a sample request to localhost:8080 | |
run: | | |
TEMP_OUTPUT_FILE=$(mktemp) | |
HTTP_CODE=$(curl --silent --output $TEMP_OUTPUT_FILE --write-out "%{http_code}" "http://localhost:8080") | |
if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]] ; then | |
>&2 cat $TEMP_OUTPUT_FILE | |
exit 1; | |
fi | |
cat $TEMP_OUTPUT_FILE | |
rm $TEMP_OUTPUT_FILE | |
- name: Send a sample request to localhost:8080/exception | |
run: | | |
TEMP_OUTPUT_FILE=$(mktemp) | |
HTTP_CODE=$(curl --silent --output $TEMP_OUTPUT_FILE --write-out "%{http_code}" "http://localhost:8080/exception") | |
if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]] ; then | |
>&2 cat $TEMP_OUTPUT_FILE | |
exit 1; | |
fi | |
cat $TEMP_OUTPUT_FILE | |
rm $TEMP_OUTPUT_FILE |