TEMP PR - Add Span Metrics Processor and MetricAttributeGenerator int… #48
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
# This workflow check the code style and run unit tests for the repo | |
name: AWS Distro Tests | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
env: | |
# We use these variables to convert between tox and GHA version literals | |
py37: 3.7 | |
py38: 3.8 | |
py39: 3.9 | |
py310: "3.10" | |
py311: "3.11" | |
pypy3: "pypy3.7" | |
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
python-version: [ py37, py38, py39, py310, py311, pypy3 ] | |
package: [ "aws-opentelemetry-distro" ] | |
os: [ ubuntu-20.04 ] | |
steps: | |
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ env[matrix.python-version] }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env[matrix.python-version] }} | |
- name: Install tox | |
run: pip install tox==3.27.1 tox-factor | |
- name: Cache tox environment | |
# Preserves .tox directory between runs for faster installs | |
uses: actions/cache@v1 | |
with: | |
path: | | |
.tox | |
~/.cache/pip | |
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }} | |
- name: run tox | |
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json | |
misc: | |
strategy: | |
fail-fast: false | |
matrix: | |
tox-environment: ["spellcheck", "lint"] | |
name: ${{ matrix.tox-environment }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: pip install tox==3.27.1 | |
- 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@v1 | |
with: | |
path: | | |
.tox | |
~/.cache/pip | |
key: v7-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', | |
'dev-requirements.txt') }} | |
- name: run tox | |
run: tox -e ${{ matrix.tox-environment }} |