Skip to content

Add CI workflow for PR validation#17

Merged
daviburg merged 3 commits intomainfrom
feature/ci-workflow
Apr 4, 2026
Merged

Add CI workflow for PR validation#17
daviburg merged 3 commits intomainfrom
feature/ci-workflow

Conversation

@daviburg
Copy link
Copy Markdown
Member

@daviburg daviburg commented Apr 4, 2026

Summary

Add a CI workflow that builds and tests on every PR and push to main, plus a build status badge in README.

Changes

  • .github/workflows/ci.yml — New CI workflow:
    • Triggers on push to main and PRs targeting main
    • Builds and tests on both ubuntu-latest and windows-latest
    • Packs NuGet package and uploads as build artifact (does NOT publish)
  • README.md — Added CI status badge at the top

Design Decisions

  • Uses a matrix strategy for cross-platform validation (matching the SDK's multi-platform support)
  • Pack job depends on build-and-test to avoid wasting resources on broken builds
  • Pack runs on ubuntu-latest only (matches release.yml pattern)
  • No version determination needed — pack uses default version from Directory.Build.props

Follow-up

Closes #5

@daviburg daviburg requested a review from a team as a code owner April 4, 2026 00:21
@daviburg daviburg self-assigned this Apr 4, 2026
@daviburg daviburg requested a review from Copilot April 4, 2026 00:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a GitHub Actions CI workflow to validate builds/tests on every PR to main and every push to main, and exposes the workflow status via a README badge.

Changes:

  • Added a new CI workflow that runs dotnet restore/build/test on ubuntu-latest and windows-latest.
  • Added a packaging job that runs on Ubuntu after tests pass and uploads the produced .nupkg as a build artifact.
  • Added a CI status badge to the top of the README.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/ci.yml Introduces PR/push validation across Ubuntu/Windows plus a gated packaging artifact job.
README.md Adds a workflow status badge pointing to the new CI workflow.

@daviburg daviburg merged commit 5b0058a into main Apr 4, 2026
3 checks passed
@daviburg daviburg deleted the feature/ci-workflow branch April 4, 2026 00:57
daviburg added a commit that referenced this pull request May 7, 2026
## Summary

Two codegen naming improvements (issue #114):

### 1. `.Models` Sub-namespace (#16)

Move model types from the connector root namespace to a `.Models`
sub-namespace:

```csharp
// BEFORE - 30+ types in one namespace
using Azure.Connectors.Sdk.Office365;

// AFTER - client in root, models in .Models
using Azure.Connectors.Sdk.Office365;
using Azure.Connectors.Sdk.Office365.Models;
```

### 2. PascalCase Client Names (#17)

| Before | After |
|--------|-------|
| `AzureblobClient` | `AzureBlobClient` |
| `MsgraphgroupsanduserClient` | `MsGraphGroupsAndUsersClient` |
| `OnedriveforbusinessClient` | `OneDriveForBusinessClient` |
| `SharepointonlineClient` | `SharePointOnlineClient` |

### Breaking Changes

- Model types require `using {Connector}.Models;`
- 4 client classes renamed to PascalCase
- 4 ConnectorNames constants renamed to match
- ModelFactory classes moved to `.Models` namespace

### Validation

- [x] `dotnet build` - 0 errors, 0 warnings
- [x] `dotnet test` - 259 passed, 0 failed

### Generator Changes

BPM CodefulSdkGenerator updated in parallel (internal ADO PR) to emit
these naming changes for future regeneration.

Closes #114
daviburg added a commit that referenced this pull request May 10, 2026
## Summary

Implements all 5 actionable suggestions from the [v0.9 API Design
Evaluation](../docs/API-DESIGN-EVALUATION-v09.md) in a single PR.

### Changes

| # | Suggestion | APIView Comments Resolved | Breaking? |
|---|-----------|--------------------------|-----------|
| #31 | Add \(Uri, TokenCredential)\ constructor overload | 27 | No
(additive) |
| #32 | Make JSON converter types internal | 3 | Yes* |
| #33 | \ConnectorHttpClient\ virtual + mocking constructor | 2 | No
(additive) |
| #34 | PascalCase client names (\AzureMonitorLogsClient\,
\Office365UsersClient\) | — | Yes |
| #35 | Make \IPageable<T>\ internal | 1 | Yes* |

\* Unlikely to affect consumers — these are infrastructure types.

**Total APIView comments addressed: 33** (out of 623 total; the
remaining 590 are sync-variant/return-type/generic-name comments that
are Skip decisions per the evaluation).

### Details

**#31 — Constructor overload (27 comments)**
Added \(Uri, TokenCredential)\ constructor to \ConnectorClientBase\ and
all 12 generated clients. The Azure SDK guideline requires a constructor
without \ClientOptions\ as the last parameter.

**#32 — JSON converter types (3 comments)**
Changed \Iso8601DateTimeConverter\, \Iso8601TimeSpanConverter\,
\NullableTimeSpanConverter\ from \public\ to \internal\. These are
serialization infrastructure used by \[JsonConverter]\ attributes on
generated models.

**#33 — ConnectorHttpClient mockability (2 comments)**
Added \protected ConnectorHttpClient()\ parameterless constructor and
marked \SendAsync\ as \ irtual\. Completes the mockability story — all
SDK types now support mocking.

**#34 — Client name PascalCase (continuation of v0.8 #17)**
- \AzuremonitorlogsClient\ → \AzureMonitorLogsClient\
- \Office365usersClient\ → \Office365UsersClient\
- Updated namespaces, DI extensions, ConnectorNames constants, and test
files.

**#35 — IPageable\<T\> internal (1 comment)**
Changed \IPageable<T>\ from \public\ to \internal\. Generated clients
already return \AsyncPageable<T>\ (from Azure.Core) publicly.
\IPageable<T>\ is now an internal deserialization contract only. Changed
\CreatePageable\ from \protected\ to \private protected\ to match.

### Test Results

All 274 tests pass.

Fixes #123, #124, #125, #126, #127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI workflow for PR validation (build, test, pack)

2 participants