Skip to content

[WIP] Add integration tests #19

[WIP] Add integration tests

[WIP] Add integration tests #19

Workflow file for this run

name: "Integration Tests"
on: [push, pull_request]
jobs:
integration_test:
name: Integration Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
swift: ["5.9", "5.10", "latest"]
steps:
- name: Install Swift
uses: vapor/swiftly-action@v0.1
with:
toolchain: ${{ matrix.swift }}
env:
SWIFTLY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4.2.0
- name: Resolve Swift dependencies
run: |
cd IntegrationTests
swift package resolve
- name: Start OTel Collector
run: |
cd IntegrationTests
docker compose -f docker/docker-compose.yaml up -d
- name: Test
run: |
cd IntegrationTests
sleep 10
docker compose -f docker/docker-compose.yaml logs
ls -lah ${{ github.workspace }}/docker/otel-collector-output
cat ${{ github.workspace }}/docker/otel-collector-output/output.jsonl
- name: Wait for OTel Collector
uses: iFaxity/wait-on-action@v1.2.1
with:
resource: file:${{ github.workspace }}/IntegrationTests/docker/otel-collector-output/output.jsonl
timeout: 10000
- name: Run Integration Tests
run: |
cd IntegrationTests
OTEL_COLLECTOR_OUTPUT=$(pwd)/docker/otel-collector-output swift test