Add logic to instrument AWS Lambda functions using Application Signals #330
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: DotNet Instrumentation PR Build | |
on: | |
pull_request: | |
branches: | |
- main | |
- "release/v*" | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build on Linux | |
if: runner.os == 'Linux' | |
run: bash build.sh | |
- name: Build on Windows | |
if: runner.os == 'Windows' | |
run: .\build.cmd | |
- name: Build on macOS | |
if: runner.os == 'macOS' | |
run: bash build.sh | |
- name: Test on Linux | |
if: runner.os == 'Linux' | |
run: dotnet test | |
- name: Test on Windows | |
if: runner.os == 'Windows' | |
run: dotnet test | |
- name: Test on macOS | |
if: runner.os == 'macOS' | |
run: dotnet test | |
build-arm: | |
runs-on: codebuild-adot-dotnet-runner-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build on Linux | |
run: bash build.sh | |
- name: Test on Linux | |
run: dotnet test | |
build-x64-musl: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Build in Docker container | |
run: | | |
set -e | |
docker build -t mybuildimage -f "./docker/alpine.dockerfile" ./docker | |
docker run --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \ | |
/bin/sh -c 'git config --global --add safe.directory /project && dotnet test && ./build.sh' | |
build-arm-musl: | |
runs-on: codebuild-adot-dotnet-runner-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Build in Docker container | |
run: | | |
set -e | |
docker build -t mybuildimage -f "./docker/alpine.dockerfile" ./docker | |
docker run --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \ | |
/bin/sh -c 'git config --global --add safe.directory /project && dotnet test && ./build.sh' | |
contract-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Set up and run contract tests with pytest | |
run: | | |
cd test | |
bash ./build-and-install-distro.sh | |
bash ./set-up-contract-tests.sh | |
pytest contract-tests/tests |