name: Integration Tests

on:
  push:
    branches: [ 'main*' ]
    paths-ignore:
    - '**.md'
  pull_request:
    branches: [ 'main*' ]
    paths-ignore:
    - '**.md'

jobs:
  w3c-trace-context-test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        version: [net6.0,net7.0]
    steps:
      - uses: actions/checkout@v3

      - name: Run W3C Trace Context docker-compose.integration
        run: docker-compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build

  otlp-exporter-test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        version: [net6.0,net7.0]
    steps:
      - uses: actions/checkout@v3

      - name: Run OTLP Exporter docker-compose.integration
        run: docker-compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
