diff --git a/src/metrics/test_coverage/__tests__/fixtures/mocked-workflow-job-test-coverage.json b/src/metrics/test_coverage/__tests__/fixtures/mocked-workflow-job-test-coverage.json deleted file mode 100644 index fc9ae51..0000000 --- a/src/metrics/test_coverage/__tests__/fixtures/mocked-workflow-job-test-coverage.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "action": "completed", - "workflow_job": { - "id": 12134495892, - "run_id": 4470121878, - "workflow_name": "Unit Test", - "head_branch": "main", - "run_url": "https://api.github.com/repos/deven-org/telemetry-functions/actions/runs/4470121878", - "run_attempt": 2, - "node_id": "CR_kwDOI7W9J88AAAAC00W2lA", - "head_sha": "40ca7f59356451c3e0b1875a654027ed9bbf00fd", - "url": "https://api.github.com/repos/deven-org/telemetry-functions/actions/jobs/12134495892", - "html_url": "https://github.com/deven-org/telemetry-functions/actions/runs/4470121878/jobs/7853296527", - "status": "completed", - "conclusion": "success", - "created_at": "2023-03-20T15:49:36Z", - "started_at": "2023-03-20T15:49:44Z", - "completed_at": "2023-03-20T15:50:14Z", - "name": "Unit-Test", - "steps": [ - { - "name": "Set up job", - "status": "completed", - "conclusion": "success", - "number": 1, - "started_at": "2023-03-20T15:49:43.000Z", - "completed_at": "2023-03-20T15:49:46.000Z" - }, - { - "name": "Check out repository code", - "status": "completed", - "conclusion": "success", - "number": 2, - "started_at": "2023-03-20T15:49:46.000Z", - "completed_at": "2023-03-20T15:49:47.000Z" - }, - { - "name": "Setup node environment", - "status": "completed", - "conclusion": "success", - "number": 3, - "started_at": "2023-03-20T15:49:48.000Z", - "completed_at": "2023-03-20T15:49:53.000Z" - }, - { - "name": "Cache dependencies", - "status": "completed", - "conclusion": "success", - "number": 4, - "started_at": "2023-03-20T15:49:53.000Z", - "completed_at": "2023-03-20T15:49:59.000Z" - }, - { - "name": "Install Dependencies", - "status": "completed", - "conclusion": "skipped", - "number": 5, - "started_at": "2023-03-20T15:50:00.000Z", - "completed_at": "2023-03-20T15:50:00.000Z" - }, - { - "name": "Run test", - "status": "completed", - "conclusion": "success", - "number": 6, - "started_at": "2023-03-20T15:50:00.000Z", - "completed_at": "2023-03-20T15:50:11.000Z" - }, - { - "name": "Post Cache dependencies", - "status": "completed", - "conclusion": "success", - "number": 10, - "started_at": "2023-03-20T15:50:11.000Z", - "completed_at": "2023-03-20T15:50:11.000Z" - }, - { - "name": "Post Setup node environment", - "status": "completed", - "conclusion": "success", - "number": 11, - "started_at": "2023-03-20T15:50:12.000Z", - "completed_at": "2023-03-20T15:50:12.000Z" - }, - { - "name": "Post Check out repository code", - "status": "completed", - "conclusion": "success", - "number": 12, - "started_at": "2023-03-20T15:50:12.000Z", - "completed_at": "2023-03-20T15:50:12.000Z" - }, - { - "name": "Complete job", - "status": "completed", - "conclusion": "success", - "number": 13, - "started_at": "2023-03-20T15:50:12.000Z", - "completed_at": "2023-03-20T15:50:12.000Z" - } - ], - "check_run_url": "https://api.github.com/repos/deven-org/telemetry-functions/check-runs/12134495892", - "labels": [ - "ubuntu-latest" - ], - "runner_id": 2, - "runner_name": "GitHub Actions 2", - "runner_group_id": 2, - "runner_group_name": "GitHub Actions" - }, - "repository": { - "id": 599112999, - "node_id": "R_kgDOI7W9Jw", - "name": "telemetry-functions", - "full_name": "deven-org/telemetry-functions", - "private": false, - "owner": { - "login": "deven-org", - "id": 118735834, - "node_id": "O_kgDOBxPD2g", - "avatar_url": "https://avatars.githubusercontent.com/u/118735834?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/deven-org", - "html_url": "https://github.com/deven-org", - "followers_url": "https://api.github.com/users/deven-org/followers", - "following_url": "https://api.github.com/users/deven-org/following{/other_user}", - "gists_url": "https://api.github.com/users/deven-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/deven-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/deven-org/subscriptions", - "organizations_url": "https://api.github.com/users/deven-org/orgs", - "repos_url": "https://api.github.com/users/deven-org/repos", - "events_url": "https://api.github.com/users/deven-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/deven-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/deven-org/telemetry-functions", - "description": null, - "fork": false, - "url": "https://api.github.com/repos/deven-org/telemetry-functions", - "forks_url": "https://api.github.com/repos/deven-org/telemetry-functions/forks", - "keys_url": "https://api.github.com/repos/deven-org/telemetry-functions/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/deven-org/telemetry-functions/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/deven-org/telemetry-functions/teams", - "hooks_url": "https://api.github.com/repos/deven-org/telemetry-functions/hooks", - "issue_events_url": "https://api.github.com/repos/deven-org/telemetry-functions/issues/events{/number}", - "events_url": "https://api.github.com/repos/deven-org/telemetry-functions/events", - "assignees_url": "https://api.github.com/repos/deven-org/telemetry-functions/assignees{/user}", - "branches_url": "https://api.github.com/repos/deven-org/telemetry-functions/branches{/branch}", - "tags_url": "https://api.github.com/repos/deven-org/telemetry-functions/tags", - "blobs_url": "https://api.github.com/repos/deven-org/telemetry-functions/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/deven-org/telemetry-functions/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/deven-org/telemetry-functions/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/deven-org/telemetry-functions/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/deven-org/telemetry-functions/statuses/{sha}", - "languages_url": "https://api.github.com/repos/deven-org/telemetry-functions/languages", - "stargazers_url": "https://api.github.com/repos/deven-org/telemetry-functions/stargazers", - "contributors_url": "https://api.github.com/repos/deven-org/telemetry-functions/contributors", - "subscribers_url": "https://api.github.com/repos/deven-org/telemetry-functions/subscribers", - "subscription_url": "https://api.github.com/repos/deven-org/telemetry-functions/subscription", - "commits_url": "https://api.github.com/repos/deven-org/telemetry-functions/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/deven-org/telemetry-functions/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/deven-org/telemetry-functions/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/deven-org/telemetry-functions/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/deven-org/telemetry-functions/contents/{+path}", - "compare_url": "https://api.github.com/repos/deven-org/telemetry-functions/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/deven-org/telemetry-functions/merges", - "archive_url": "https://api.github.com/repos/deven-org/telemetry-functions/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/deven-org/telemetry-functions/downloads", - "issues_url": "https://api.github.com/repos/deven-org/telemetry-functions/issues{/number}", - "pulls_url": "https://api.github.com/repos/deven-org/telemetry-functions/pulls{/number}", - "milestones_url": "https://api.github.com/repos/deven-org/telemetry-functions/milestones{/number}", - "notifications_url": "https://api.github.com/repos/deven-org/telemetry-functions/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/deven-org/telemetry-functions/labels{/name}", - "releases_url": "https://api.github.com/repos/deven-org/telemetry-functions/releases{/id}", - "deployments_url": "https://api.github.com/repos/deven-org/telemetry-functions/deployments", - "created_at": "2023-02-08T13:35:04Z", - "updated_at": "2023-03-17T12:40:26Z", - "pushed_at": "2023-03-20T15:43:15Z", - "git_url": "git://github.com/deven-org/telemetry-functions.git", - "ssh_url": "git@github.com:deven-org/telemetry-functions.git", - "clone_url": "https://github.com/deven-org/telemetry-functions.git", - "svn_url": "https://github.com/deven-org/telemetry-functions", - "homepage": null, - "size": 1215, - "stargazers_count": 1, - "watchers_count": 1, - "language": "TypeScript", - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "has_discussions": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 13, - "license": null, - "allow_forking": true, - "is_template": false, - "web_commit_signoff_required": false, - "topics": [], - "visibility": "public", - "forks": 0, - "open_issues": 13, - "watchers": 1, - "default_branch": "main" - }, - "organization": { - "login": "deven-org", - "id": 118735834, - "node_id": "O_kgDOBxPD2g", - "url": "https://api.github.com/orgs/deven-org", - "repos_url": "https://api.github.com/orgs/deven-org/repos", - "events_url": "https://api.github.com/orgs/deven-org/events", - "hooks_url": "https://api.github.com/orgs/deven-org/hooks", - "issues_url": "https://api.github.com/orgs/deven-org/issues", - "members_url": "https://api.github.com/orgs/deven-org/members{/member}", - "public_members_url": "https://api.github.com/orgs/deven-org/public_members{/member}", - "avatar_url": "https://avatars.githubusercontent.com/u/118735834?v=4", - "description": "Developer Enviroment / Enablement / Enhancement" - }, - "sender": { - "login": "pixari", - "id": 7393475, - "node_id": "MDQ6VXNlcjczOTM0NzU=", - "avatar_url": "https://avatars.githubusercontent.com/u/7393475?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/pixari", - "html_url": "https://github.com/pixari", - "followers_url": "https://api.github.com/users/pixari/followers", - "following_url": "https://api.github.com/users/pixari/following{/other_user}", - "gists_url": "https://api.github.com/users/pixari/gists{/gist_id}", - "starred_url": "https://api.github.com/users/pixari/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/pixari/subscriptions", - "organizations_url": "https://api.github.com/users/pixari/orgs", - "repos_url": "https://api.github.com/users/pixari/repos", - "events_url": "https://api.github.com/users/pixari/events{/privacy}", - "received_events_url": "https://api.github.com/users/pixari/received_events", - "type": "User", - "site_admin": false - } -} \ No newline at end of file diff --git a/src/metrics/test_coverage/getReleaseByTitle.ts b/src/metrics/test_coverage/getReleaseByTitle.ts deleted file mode 100644 index fd93cf8..0000000 --- a/src/metrics/test_coverage/getReleaseByTitle.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { pick } from "ramda"; -import semverCoerce from "semver/functions/coerce"; - -export const getReleaseByTitle = (title: string) => - pick( - ["raw", "major", "minor", "patch", "prerelease", "build", "version"], - semverCoerce(title) - ); - \ No newline at end of file