{"id":22218319,"url":"https://github.com/coders-school/github-actions","last_synced_at":"2025-03-25T07:17:47.320Z","repository":{"id":37831953,"uuid":"496286955","full_name":"coders-school/github-actions","owner":"coders-school","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-22T20:05:42.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-30T06:29:33.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coders-school.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-25T15:23:21.000Z","updated_at":"2022-05-27T10:54:11.000Z","dependencies_parsed_at":"2022-08-19T22:10:48.909Z","dependency_job_id":null,"html_url":"https://github.com/coders-school/github-actions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fgithub-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fgithub-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fgithub-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coders-school%2Fgithub-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coders-school","download_url":"https://codeload.github.com/coders-school/github-actions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245414550,"owners_count":20611367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T22:20:17.185Z","updated_at":"2025-03-25T07:17:47.298Z","avatar_url":"https://github.com/coders-school.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coders school - GitHub actions\n\n## Coverage rate comment action\nAdds comment saying that coverage rate is too low.\nIt also contains a link to the action's summary when you can find a detailed coverage report as an artifact.\n\nComment content:\n\u003e Coverage rate is less than 90%. You can download detailed coverage report in action's summary. Look for Artifacts in the bottom of this page\n\n### Usage\n```yaml\n- uses: coders-school/github-actions/coverage-rate-comment@main\n  if: ${{ failure() \u0026\u0026 github.event_name == 'pull_request' }}\n```\n\n## Run tests action\nBuilds and runs tests.\nBuild directory is `.github/scripts/build`.\nTo work properly, it needs a CMakeLists.txt file in `.github/scripts`.\nCMake will be provided with 2 parameters:\n- `TASK` - task name that should be built\n- `TEST_FRAMEWORK` - UT framework that should be used (catch2 or gtest)\n\n### Parameters\n- `task_name` - name of the task (*required*)\n- `test_file` - path to the file containing tests (*required*)\n- `test-to_run` - name of the executable to build and run (default value is equal to `task_name`)\n\n### Usage\n```yaml\n- uses: coders-school/github-actions/run-tests@main\n  with:\n    task_name: 'unique_ptr'\n    test_file: '../tests/unique_ptr_tests.cpp'\n```\n\n```yaml\n- uses: coders-school/github-actions/run-tests@main\n  with:\n    task_name: 'unique_ptr'\n    test_file: '../../../homework/unique_ptr/unique_ptr_tests.cpp'\n    test_to_run: 'unique_ptr_student'\n```\n\n## Coverage check action\nBuilds and runs tests.\nThen runs coverage check.\nIt uses both \"Run tests\" and \"Coverage rate comment\" actions.\n\n### Parameters\n- `task_name` - name of the task (*required*)\n- `test_file` - path to the file containing tests (*required*)\n- `test-to_run` - name of the executable to build and run (default value is equal to `task_name`)\n- `lcov_file` - name of the file that need to be included in coverage report (*required*)\n- `template_pattern` - regex pattern that matches template instantiation. If it's not provided, template instantiation check will be skipped.\n\n### Usage\n```yaml\n- uses: coders-school/github-actions/coverage-check@main\n  with:\n    task_name: 'unique_ptr'\n    test_file: '../../../homework/unique_ptr/unique_ptr_tests.cpp'\n    test_to_run: 'unique_ptr_student'\n    lcov_file: 'unique_ptr.hpp'\n    template_pattern: 'template\\s*class\\s*my::unique_ptr\u003c\\s*\\w+\\s*\u003e'\n```\n\n```yaml\n- uses: coders-school/github-actions/coverage-check@main\n  with:\n    task_name: 'unique_ptr'\n    test_file: '../../../homework/unique_ptr/unique_ptr_tests.cpp'\n    test_to_run: 'unique_ptr_student'\n    lcov_file: 'unique_ptr.hpp'\n```\n\n## Clang-format check\nChecks code formatting using clang-format.\nIt requires `.clang-format` file in repo's top-level directory.\n\n### Parameters\n- `check_path` - path to task directory (*required*)\n- `exclude_dir` - directory that need to be excluded from formatting check\n\n### Usage\n```yaml\n- uses: coders-school/github-actions/clang-format-check@main\n  with:\n    check_path: 'homework/shared_ptr'\n```\n\n```yaml\n- uses: coders-school/github-actions/clang-format-check@main\n  with:\n    check_path: 'homework/shared_ptr'\n    exclude_dir: './tests'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fgithub-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoders-school%2Fgithub-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoders-school%2Fgithub-actions/lists"}