diff --git a/.github/workflows/aaronrunner.yml b/.github/workflows/aaronrunner.yml index 10c393b..31a2df8 100644 --- a/.github/workflows/aaronrunner.yml +++ b/.github/workflows/aaronrunner.yml @@ -8,8 +8,79 @@ jobs: run: | rm -rf ./ticketsrus-aaron-bryce-carlos - name: "clone" - run: git clone https://${{secrets.AARON_SECRET_GITHUB}}@github.com/SnowSE/ticketsrus-aaron-bryce-carlos.git + run: git clone https://${{secrets.AARON_MAR_SECRET}}@github.com/SnowSE/ticketsrus-aaron-bryce-carlos.git + - name: "linting is so simple once their is an .editorconfig" + run: | + cd ./ticketsrus-aaron-bryce-carlos + dotnet format --verify-no-changes + - name: "Integration tests" + # when running this command on the command line, add -it remove --user stuff + # sad I didn't get it to all run in docker + #run: docker run --rm -v "$(pwd):/app" -w /app/TestTicket -e DOTNET_CLI_HOME="/tmp/dotnet" --user $(id -u):$(id -g) mcr.microsoft.com/dotnet/sdk:8.0 dotnet test + run: | + cd ./ticketsrus-aaron-bryce-carlos/TestTicket + dotnet test + - name: "unit tests" + run: | + cd ./ticketsrus-aaron-bryce-carlos/UnitTest + dotnet test + # - name: "build with warnings" + # run: | + # cd ./ticketsrus-aaron-bryce-carlos + # dotnet build -warnaserror - name: "run build" run: | cd ./ticketsrus-aaron-bryce-carlos/AaronDocker - docker compose up --build -d \ No newline at end of file + docker compose up --build -d + # - name: "Teams Notification" + # uses: skitionek/notify-microsoft-teams@master + # if: failure() + # with: + # webhook_url: ${{ secrets.AARONWEBHOOK }} + # needs: ${{ toJson(needs) }} + # job: ${{ toJson(job) }} + # steps: ${{ toJson(steps) }} + - name: "Failure Notification" + uses: skitionek/notify-microsoft-teams@master + if: failure() + with: + webhook_url: ${{ secrets.AARONWEBHOOK}} + raw: >- + { + "@type": "MessageCard", + "@context": "http://schema.org/extensions", + "correlationId": "0b72cc8a2cea509ba06b41892066784d7f602834", + "themeColor": "#345", + "title": "Aaron had a bad workflow, much shame", + "summary": "[SnowSE/ticketsrus-aaron-bryce-carlos](https://github.com/SnowSE/ticketsrus-aaron-bryce-carlos)", + "sections": [ + { + "activityTitle": "", + "activitySubtitle": "failure", + "activityImage": "https://cdn4.iconfinder.com/data/icons/web-design-and-development-88/64/web_application_error_crash_error-512.png" + } + ], + "potentialAction": [ + { + "@type": "OpenUri", + "name": "Repository", + "targets": [ + { + "os": "default", + "uri": "https://github.com/SnowSE/ticketsrus-aaron-bryce-carlos" + } + ] + }, + { + "@type": "OpenUri", + "name": "Compare", + "targets": [ + { + "os": "default", + "uri": "https://github.com/SnowSE/ticketsrus-aaron-bryce-carlos/" + } + ] + } + ], + "text": "" + } \ No newline at end of file diff --git a/BlazorTickets/Program.cs b/BlazorTickets/Program.cs index 80d16f2..12c9c4d 100644 --- a/BlazorTickets/Program.cs +++ b/BlazorTickets/Program.cs @@ -6,12 +6,19 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Diagnostics.HealthChecks; +<<<<<<< HEAD using Microsoft.Extensions.Logging; using OpenTelemetry; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; +======= +//using OpenTelemetry.Logs; +//using OpenTelemetry.Metrics; +//using OpenTelemetry.Resources; +//using OpenTelemetry.Trace; +>>>>>>> 66b01ab1230c00046ec42d5b2d49ae1a2c7ce667 using TicketLibrary.Services; var builder = WebApplication.CreateBuilder(args); @@ -20,6 +27,7 @@ builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); +//int aaronsBadWarn = 7; builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -32,6 +40,7 @@ builder.Services.AddHealthChecks(); builder.Services.AddLogging(); +<<<<<<< HEAD const string serviceName = "bryceservice"; var serviceVersion = "1.0.0"; @@ -46,6 +55,22 @@ o.Endpoint = new Uri("http://otel-collector:4317") ); }); +======= +//const string serviceName = "bryceservice"; + +//builder.Logging.AddOpenTelemetry(options => +//{ +// options +// .SetResourceBuilder( +// ResourceBuilder.CreateDefault() +// .AddService(serviceName)) +// .AddOtlpExporter(opt => +// { +// opt.Endpoint = new Uri("http://otel-collector:4317/"); +// }) +// .AddConsoleExporter(); +//}); +>>>>>>> 66b01ab1230c00046ec42d5b2d49ae1a2c7ce667 builder.Services.AddOpenTelemetry() .ConfigureResource(r => r.AddService(serviceName)) diff --git a/TestTicket/TicketTests.cs b/TestTicket/TicketTests.cs index b7b07df..6a6d838 100644 --- a/TestTicket/TicketTests.cs +++ b/TestTicket/TicketTests.cs @@ -14,7 +14,7 @@ public class TicketTests(TicketFactory factory) : IClassFixture [Fact] public void CanHavePassingTest() { - Assert.Equal(2, 1); + Assert.Equal(1, 1); }