Skip to content

Commit

Permalink
Changed GitHub Actions config to run test containers
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Aug 4, 2023
1 parent 3ec0e0e commit 2d6de2d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build.dotnet.testcontainers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Test with TestContainers

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"

- name: Restore NuGet packages
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --configuration Release --no-build --filter "Category!=SkipCI&FullyQualifiedName~Marten.Integration.Tests" --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: '**/test-results.trx'
2 changes: 1 addition & 1 deletion .github/workflows/build.dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --configuration Release --no-build --filter Category!=SkipCI --logger "trx;LogFileName=test-results.trx"
run: dotnet test --configuration Release --no-build --filter "Category!=SkipCI&FullyQualifiedName!~Marten.Integration.Tests" --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions EventSourcing.NetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{F078A982-331A-4EB6-B6F8-34464359B05D}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.dotnet.yml = .github\workflows\build.dotnet.yml
.github\workflows\build.dotnet.testcontainers.yml = .github\workflows\build.dotnet.testcontainers.yml
.github\workflows\publish.docker.yml = .github\workflows\publish.docker.yml
.github\workflows\build.dotnet.testreport.yml = .github\workflows\build.dotnet.testreport.yml
EndProjectSection
Expand Down

0 comments on commit 2d6de2d

Please sign in to comment.