Skip to content

Commit 63f6d0b

Browse files
committed
Run tests on runners
1 parent dbc123a commit 63f6d0b

File tree

3 files changed

+10
-62
lines changed

3 files changed

+10
-62
lines changed

.github/actions/test-app/action.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/ci-build.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ name: ci-build
2323

2424
env:
2525
REGISTRY: ghcr.io
26+
DOTNET_VERSION: 9.0.x
2627

2728
jobs:
2829

@@ -34,27 +35,22 @@ jobs:
3435
matrix:
3536
include:
3637
- name: common-unit
37-
dockerfile: docker/Base.Dockerfile
38-
image: test-common
39-
target: test-common
38+
project: Common.Tests/Common.Tests.csproj
4039
- name: api-integration
41-
dockerfile: docker/API.Dockerfile
42-
image: api-integration-tests
43-
target: integration-test-api
40+
project: API.IntegrationTests/API.IntegrationTests.csproj
4441

4542
steps:
4643
- name: Checkout
4744
uses: actions/checkout@v5
4845

49-
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@v3
46+
- uses: actions/setup-dotnet@v5
47+
with:
48+
dotnet-version: '${{ env.DOTNET_VERSION }}'
5149

5250
- name: Run ${{ matrix.name }} tests
53-
uses: ./.github/actions/test-app
54-
with:
55-
dockerfile: ${{ matrix.dockerfile }}
56-
image: ${{ matrix.image }}
57-
target: ${{ matrix.target }}
51+
run: |
52+
set -euo pipefail
53+
dotnet test -c Release ${{ matrix.project }}
5854
5955
build:
6056
name: Build (${{ matrix.image }})
@@ -116,7 +112,7 @@ jobs:
116112
username: ${{ github.actor }}
117113
password: ${{ secrets.GITHUB_TOKEN }}
118114

119-
- name: Build ${{ matrix.image }}
115+
- name: Promote Manifest ${{ matrix.image }}
120116
uses: ./.github/actions/promote-image
121117
with:
122118
image: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image }}

docker/API.Dockerfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ COPY --link API/. API/
99

1010
RUN dotnet publish --no-restore -c Release API/API.csproj -o /app
1111

12-
# Integration test stage
13-
FROM build-api AS integration-test-api
14-
15-
COPY --link API.IntegrationTests/*.csproj API.IntegrationTests/
16-
RUN dotnet restore API.IntegrationTests/API.IntegrationTests.csproj
17-
18-
COPY --link API.IntegrationTests/. API.IntegrationTests/
19-
20-
RUN dotnet build -c Release API.IntegrationTests/API.IntegrationTests.csproj
21-
22-
ENTRYPOINT ["dotnet", "test", "--no-build", "-c", "Release", "API.IntegrationTests/API.IntegrationTests.csproj"]
23-
2412
# final is the final runtime stage for running the app
2513
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final-api
2614
WORKDIR /app

0 commit comments

Comments
 (0)