[WIP] Add integration tests #20
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 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 | |
- 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 |