Skip to content

Bump xunit.runner.visualstudio from 3.1.0 to 4.0.0 #409

Bump xunit.runner.visualstudio from 3.1.0 to 4.0.0

Bump xunit.runner.visualstudio from 3.1.0 to 4.0.0 #409

name: Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
dotnet-version: ["9", "10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Log into registry
# GHCR_PAT is a personal access token for the Github Container Registry; You can create it using the following steps:
# 1) Go to https://github.com/settings/tokens
# 2) Create a new token (classic as of 2025-04-02)
# 3) Select the following scopes: read:packages
# GHCR_USR is the username for the Github Container Registry; it has to match the PAT and is the username of the Github account that created the PAT
# You can update the tokens in the repository settings:
# https://github.com/Hochfrequenz/transformer.bee_client.net/settings/secrets/actions/GHCR_PAT
# https://github.com/Hochfrequenz/transformer.bee_client.net/settings/secrets/actions/GHCR_USR
# Tokens will expire 2026-04-01
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ secrets.GHCR_USR }} --password-stdin
- name: Start containers
run: docker compose -f "TransformerBeeClient/TransformerBeeClient.IntegrationTest/docker-compose.yml" up -d
- name: Wait for transformer.bee to be ready
# the container logs in a structured (JSON) format and no longer prints a startup marker we could grep for,
# so we poll /version (the same endpoint the converter uses as its kubernetes readiness probe)
run: |
for i in $(seq 1 60); do
if curl -fsS "http://localhost:${TRANSFORMER_REST_PORT:-5021}/version"; then
echo "transformer.bee is up"
exit 0
fi
sleep 2
done
echo "transformer.bee did not become ready in time"
docker compose -f "TransformerBeeClient/TransformerBeeClient.IntegrationTest/docker-compose.yml" logs
exit 1
- name: Install dependencies
working-directory: TransformerBeeClient
run: dotnet restore TransformerBeeClient.sln
- name: Build
working-directory: TransformerBeeClient
run: dotnet build --no-restore
- name: Run Integration Tests
working-directory: TransformerBeeClient/TransformerBeeClient.IntegrationTest
run: |
dotnet test
- name: Run Integration Tests (against real service)
working-directory: TransformerBeeClient/TransformerBeeClient.IntegrationTest
env:
CLIENT_ID: ${{ secrets.AUTH0_TEST_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.AUTH0_TEST_CLIENT_SECRET }}
run: |
dotnet test --filter TestCollectionName='authenticated'
- name: Run Integration Tests for Example Application
working-directory: TransformerBeeClient/ExampleAspNetCoreApplication.Test
run: |
dotnet build --no-restore
dotnet test