Skip to content

Fix/sub thread routing and apitoken access #721

Fix/sub thread routing and apitoken access

Fix/sub thread routing and apitoken access #721

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: MeshWeaver Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: Build and Run Unit tests
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore workloads
run: dotnet workload restore
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -p:CIRun=true
- name: Run Tests
continue-on-error: true
env:
DOTNET_ENVIRONMENT: Development
Logging__LogLevel__Default: Warning
run: |
find test -name '*.csproj' \
! -path '*PostgreSql*' \
! -path '*Cosmos*' \
! -path '*Orleans*' \
! -path '*Acme*' \
! -path '*FutuRe*' \
-exec dotnet test {} --no-build --verbosity normal -l:trx \; 2>&1 | tee test/test-results.log
- name: Collect test logs for artifact
if: always()
run: |
mkdir -p collected-logs
# Find all test-logs directories and collect their contents without renaming
find . -path "*/bin/*/test-logs/*.log" -type f -exec cp {} collected-logs/ \; 2>/dev/null || true
- name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action/composite@v2
uses: EnricoMi/publish-unit-test-result-action@v2.12.0
if: always()
with:
action_fail: true
# File patterns of test result files. Relative paths are known to work best, while the composite action also works with absolute paths. Supports "*", "**", "?", and "[]" character ranges. Use multiline string for multiple patterns. Patterns starting with "!" exclude the matching files. There have to be at least one pattern starting without a "!".
files: |
test/**/*.trx
- name: "Upload artifact: Test Results"
uses: actions/upload-artifact@v6
if: always()
with:
name: testResults
path: |
test/**/*.trx
test/test-results.log
collected-logs/
compression-level: 9
retention-days: 15