Skip to content

Commit 420c126

Browse files
authored
Merge pull request #2 from managedcode/codex/audit-apis-and-migrate-to-dotnet-solution
Fix Microsoft AI adapters for latest abstractions
2 parents a56426a + 65f74b6 commit 420c126

38 files changed

+2372
-124
lines changed

.github/workflows/dotnet.yml

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,43 @@
1-
name: .NET
1+
name: .NET CI
22

33
on:
44
push:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8-
9-
10-
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

1310
jobs:
14-
1511
build-and-test:
1612
runs-on: ubuntu-latest
17-
13+
1814
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: 9.0.x
22+
23+
- name: Restore dependencies
24+
run: dotnet restore Together.slnx
1925

20-
- uses: actions/checkout@v3
21-
- name: Setup .NET
22-
uses: actions/setup-dotnet@v3
23-
with:
24-
dotnet-version: 9.0.x
25-
26-
# run build and test
27-
- name: Restore dependencies
28-
run: dotnet restore
29-
30-
- name: Build
31-
run: dotnet build --no-restore --configuration Release
32-
33-
- name: Test and Collect Code Coverage
34-
run: dotnet test --configuration Release -p:CollectCoverage=true -p:CoverletOutput=coverage/
26+
- name: Build
27+
run: dotnet build Together.slnx --configuration Release --no-restore
3528

36-
- name: Copy coverage files
37-
run: |
38-
mkdir '${{ github.workspace }}/coverage'
39-
find . -name "*.opencover.xml" -exec sh -c 'cp "$0" "coverage/coverage-$(basename $0)"' {} \;
29+
- name: Test and collect coverage
30+
run: dotnet test Together.slnx --configuration Release --no-build -p:CollectCoverage=true -p:CoverletOutput=coverage/
4031

41-
- name: List coverage files
42-
run: ls '${{ github.workspace }}/coverage/'
32+
- name: Copy coverage files
33+
run: |
34+
mkdir -p "${{ github.workspace }}/coverage"
35+
find . -name "*.opencover.xml" -exec sh -c 'cp "$1" "coverage/coverage-$(basename "$1")"' _ {} \;
4336
44-
- name: SonarCloud Scan
45-
uses: sonarsource/sonarcloud-github-action@master
46-
with:
47-
args: >
48-
-Dsonar.organization=managedcode
49-
-Dsonar.projectKey=managedcode_Together
50-
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
51-
-Dsonar.cs.opencover.reportsPaths=${{ github.workspace }}/coverage/
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
- name: List coverage files
38+
run: ls "${{ github.workspace }}/coverage/"
5539

56-
- name: Upload coverage reports to Codecov
57-
uses: codecov/codecov-action@v3
58-
env:
59-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
60-
61-
# - name: coveralls
62-
# uses: coverallsapp/github-action@master
63-
# with:
64-
# github-token: ${{secrets.GITHUB_TOKEN }}
65-
# path-to-lcov: coverage/coverage.info
40+
- name: Upload coverage reports to Codecov
41+
uses: codecov/codecov-action@v4
42+
env:
43+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Monitor upstream SDKs
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
check-updates:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
contents: read
14+
15+
steps:
16+
- name: Check upstream repositories
17+
id: check
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const repos = [
22+
{ owner: 'togethercomputer', repo: 'together-python' },
23+
{ owner: 'togethercomputer', repo: 'together-typescript' }
24+
];
25+
const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000);
26+
const results = [];
27+
for (const target of repos) {
28+
const { data } = await github.repos.listCommits({ owner: target.owner, repo: target.repo, per_page: 10 });
29+
const recent = data.filter(c => new Date(c.commit.committer.date) > cutoff);
30+
if (recent.length > 0) {
31+
results.push({
32+
owner: target.owner,
33+
repo: target.repo,
34+
commits: recent.map(c => ({
35+
sha: c.sha.substring(0, 7),
36+
message: c.commit.message.split('\n')[0],
37+
url: c.html_url,
38+
date: c.commit.committer.date
39+
}))
40+
});
41+
}
42+
}
43+
core.setOutput('updates', JSON.stringify(results));
44+
core.info(`Found ${results.length} repositories with updates.`);
45+
46+
- name: Create tracking issue
47+
if: steps.check.outputs.updates != '[]'
48+
uses: actions/github-script@v7
49+
env:
50+
UPDATES: ${{ steps.check.outputs.updates }}
51+
with:
52+
script: |
53+
const updates = JSON.parse(process.env.UPDATES ?? '[]');
54+
const today = new Date().toISOString().split('T')[0];
55+
let body = 'Detected new upstream commits:\n\n';
56+
for (const repo of updates) {
57+
body += `### ${repo.owner}/${repo.repo}\n`;
58+
for (const commit of repo.commits) {
59+
body += `- [${commit.sha}](${commit.url}) ${commit.message} (_${commit.date}_)\n`;
60+
}
61+
body += '\n';
62+
}
63+
await github.issues.create({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
title: `Upstream SDK updates ${today}`,
67+
body,
68+
labels: ['upstream-monitor']
69+
});
70+
71+
- name: No updates found
72+
if: steps.check.outputs.updates == '[]'
73+
run: echo "No upstream changes detected in the last 24 hours."

.github/workflows/nuget.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)