Fix native AoT test scripts #190
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: Integration Build OpenTelemetry.Exporter.OneCollector | |
permissions: | |
contents: read | |
on: | |
pull_request_target: # Allows secret access from forks see: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/#improvements-for-public-repository-forks | |
branches: [ 'main*', 'exporter*' ] | |
paths: | |
- '*/OpenTelemetry.Exporter.OneCollector*/**' | |
- 'src/Shared/**' | |
- 'build/**' | |
- '!**.md' | |
env: | |
PROJECT: OpenTelemetry.Exporter.OneCollector | |
jobs: | |
authorize: | |
environment: # Run external PRs from forks on the "external"" environment which requires approval | |
${{ github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.full_name != github.repository && | |
'external' || 'internal' }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo ✓ | |
build-integration-test: | |
needs: authorize | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
os: [ windows-latest, ubuntu-latest ] | |
version: [ net462, net6.0, net7.0, net8.0 ] | |
exclude: | |
- os: ubuntu-latest | |
version: net462 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} # Run on the fork branch once approved | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
- name: dotnet restore build/Projects/${{env.PROJECT}}.proj | |
run: dotnet restore build/Projects/${{env.PROJECT}}.proj | |
- name: dotnet build build/Projects/${{env.PROJECT}}.proj | |
run: dotnet build build/Projects/${{env.PROJECT}}.proj --configuration Release --no-restore | |
- name: dotnet test test/${{env.PROJECT}}.Tests | |
run: dotnet test test/${{env.PROJECT}}.Tests --filter CategoryName=OneCollectorIntegrationTests --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" | |
env: | |
OTEL_ONECOLLECTOR_INSTRUMENTATION_KEY: ${{ secrets.OTEL_ONECOLLECTOR_INSTRUMENTATION_KEY }} |