Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Code Coverage

on:
workflow_call:
inputs:
fail_on_low_coverage:
description: Whether to fail the workflow if coverage is below threshold (true for main, false for PRs)
required: false
type: boolean
default: false

jobs:
publish-coverage:
Expand Down Expand Up @@ -39,7 +45,7 @@ jobs:
with:
filename: "report/Cobertura.xml"
badge: true
fail_below_min: true
fail_below_min: ${{ inputs.fail_on_low_coverage }}
format: markdown
hide_branch_rate: false
hide_complexity: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dotnet-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ jobs:
if: github.actor != 'dependabot[bot]'
needs: run-tests
uses: ./.github/workflows/code-coverage.yml
secrets: inherit
with:
fail_on_low_coverage: true
secrets: inherit

detect-pr-label:
# This job detects whether the commit that triggered this push
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ jobs:
publish-coverage:
needs: run-tests
uses: ./.github/workflows/code-coverage.yml
secrets: inherit
with:
fail_on_low_coverage: true
secrets: inherit

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { createBuilder } from "./.aspire/modules/aspire.mjs";

const builder = await createBuilder();

const storage = await builder.addAzureStorage("azure-storage").runAsEmulator({
configureContainer: async (azurite) => {
await azurite
.withArgs(["--disableProductStyleUrl"])
.withBlobPort(27000)
.withQueuePort(27001)
.withTablePort(27002)
.withDataVolume({ name: "storage" });
},
});

await storage.addBlobs("blobs").withAzureStorageExplorer();

await builder.build().run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"appHost": {
"path": "apphost.mts",
"language": "typescript/nodejs"
},
"sdk": {
"version": "13.4.3"
},
"profiles": {
"https": {
"applicationUrl": "https://localhost:29750;http://localhost:28931",
"environmentVariables": {
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:10975",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:13319"
}
}
},
"packages": {
"CommunityToolkit.Aspire.Hosting.Azure.Extensions": "../../../src/CommunityToolkit.Aspire.Hosting.Azure.Extensions/CommunityToolkit.Aspire.Hosting.Azure.Extensions.csproj"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';

export default defineConfig({
files: ['apphost.mts'],
extends: [tseslint.configs.base],
languageOptions: {
parserOptions: {
projectService: true,
},
},
rules: {
'@typescript-eslint/no-floating-promises': ['error', { checkThenables: true }],
},
});
Loading
Loading