Add main_build and release_build workflow #20
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 Instrumentation PR Build | |
on: | |
pull_request: | |
branches: | |
- main | |
- main_workflow | |
- "release/v*" | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
TEST_TAG: 637423224110.dkr.ecr.us-east-1.amazonaws.com/eks/observability/adot-autoinstrumentation-python:test | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
tox-environment: ["spellcheck", "lint"] | |
steps: | |
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install libsnappy-dev | |
if: ${{ matrix.tox-environment == 'lint' }} | |
run: | | |
if ( test "${{ matrix.os }}" == "ubuntu-latest" ); then | |
sudo apt-get update && sudo apt-get install -y libsnappy-dev | |
elif ( test "${{ matrix.os }}" == "macos-latest" ); then | |
brew install snappy | |
elif ( test "${{ matrix.os }}" == "windows-latest" ); then | |
choco install snappy | |
fi | |
- name: Build Wheel and Image Files | |
uses: ./.github/actions/artifacts_build | |
with: | |
aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
image_uri_with_tag: ${{ env.TEST_TAG }} | |
image_registry: 637423224110.dkr.ecr.us-east-1.amazonaws.com | |
snapshot-ecr-role: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | |
push_image: false | |
load_image: true | |
- name: run spell check tox | |
run: tox -e ${{ matrix.tox-environment }} | |
# TODO: Add Contract test. |