Skip to content

Commit

Permalink
Strip Codecov checks entirely. We'll revisit after we see how it work…
Browse files Browse the repository at this point in the history
…s after the v4 uploader change
  • Loading branch information
Cyberboss committed Aug 20, 2024
1 parent 2bb8cee commit a700519
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/scripts/rerunFlakyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const CONSIDERED_STEP_PREFIXES = [
const CONSIDERED_JOBS = [
"Windows Live Tests",
"Linux Live Tests",
"Build .deb Package",
"Upload Code Coverage"
"Build .deb Package"
];

async function getFailedJobsForRun(github, context, workflowRunId, runAttempt) {
Expand Down
25 changes: 1 addition & 24 deletions tools/Tgstation.Server.ReleaseNotes/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ static async Task<int> Main(string[] args)
var fullNotes = versionString.Equals("--generate-full-notes", StringComparison.OrdinalIgnoreCase);
var nuget = versionString.Equals("--nuget", StringComparison.OrdinalIgnoreCase);
var genToken = versionString.Equals("--token-output-file", StringComparison.OrdinalIgnoreCase);
var waitCodecov = versionString.Equals("--wait-codecov", StringComparison.OrdinalIgnoreCase);

if ((!Version.TryParse(versionString, out var version) || version.Revision != -1)
&& !ensureRelease
&& !linkWinget
&& !shaCheck
&& !fullNotes
&& !nuget
&& !genToken
&& !waitCodecov)
&& !genToken)
{
Console.WriteLine("Invalid version: " + versionString);
return 2;
Expand Down Expand Up @@ -157,11 +155,6 @@ static async Task<int> Main(string[] args)
client.Credentials = new Credentials(githubToken);
}

if (waitCodecov)
{
return await CodecovCheck(client, Int64.Parse(args[1]));
}

if (linkWinget)
{
if (args.Length < 2 || !Uri.TryCreate(args[1], new UriCreationOptions(), out var actionsUrl))
Expand Down Expand Up @@ -1678,21 +1671,5 @@ static void DebugAssert(bool condition, string message = null)
else
Debug.Assert(condition);
}

static async ValueTask<int> CodecovCheck(IGitHubClient client, long runId)
{
var currentRun = await client.Actions.Workflows.Runs.Get(RepoOwner, RepoName, runId);

bool foundRun = false;
for(int i = 0; i < 15 && !foundRun; ++i)
{
var allRuns = await client.Check.Run.GetAllForReference(RepoOwner, RepoName, currentRun.HeadSha);
foundRun = allRuns.CheckRuns.Any(x => x.CheckSuite.Id == currentRun.Id && x.Name == "codecov/project");
if (!foundRun && i != 14)
await Task.Delay(TimeSpan.FromMinutes(1));
}

return foundRun ? 0 : 24398;
}
}
}

0 comments on commit a700519

Please sign in to comment.