Skip to content

Commit

Permalink
integration test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hf-kklein committed Jan 31, 2024
1 parent 1d81450 commit edd0635
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
dotnet-version: ["6.0.201", "7.0.100", "8.0.100"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand All @@ -19,20 +20,31 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.100"
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 2024-01-31)
# 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 2025-01-31
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ secrets.GHCR_USR }} --password-stdin
- name: Start containers
run: docker-compose up -d

- name: Install dependencies
working-directory: CutoverTasks
working-directory: TransformerBeeClient
run: dotnet restore CutoverTasks.sln

- name: Build
working-directory: CutoverTasks
working-directory: TransformerBeeClient
run: dotnet build --no-restore

- name: Start containers
run: docker-compose -f "CutoverTasks/docker-compose.integrationtest.yml" up -d

- name: Run Integration Tests
working-directory: CutoverTasks/IntegrationTests
working-directory: TransformerBeeClient/TransformerBeeClient.IntegrationTest
run: |
dotnet test
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="xunit" Version="2.6.6"/>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.6.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TransformerBeeClient\TransformerBeeClient.csproj"/>
<ProjectReference
Include="..\TransformerBeeClient\TransformerBeeClient.csproj"
/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TransformerBeeClient\TransformerBeeClient.csproj" />
<ProjectReference
Include="..\TransformerBeeClient\TransformerBeeClient.csproj"
/>
</ItemGroup>

</Project>

0 comments on commit edd0635

Please sign in to comment.