{"id":17361242,"url":"https://github.com/niqzart/ca-actions","last_synced_at":"2026-05-17T01:42:40.913Z","repository":{"id":115916108,"uuid":"606113285","full_name":"niqzart/ca-actions","owner":"niqzart","description":"Actions for running python tests, linters and format-checking ","archived":false,"fork":false,"pushed_at":"2023-02-24T18:55:21.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T16:51:54.235Z","etag":null,"topics":["actions","black","coverage","mypy","pytest","python"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niqzart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-24T16:20:09.000Z","updated_at":"2023-02-24T19:10:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"f674042a-9895-436c-8471-b057c2affc38","html_url":"https://github.com/niqzart/ca-actions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/niqzart/ca-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niqzart%2Fca-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niqzart%2Fca-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niqzart%2Fca-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niqzart%2Fca-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niqzart","download_url":"https://codeload.github.com/niqzart/ca-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niqzart%2Fca-actions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265614332,"owners_count":23798427,"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":["actions","black","coverage","mypy","pytest","python"],"created_at":"2024-10-15T19:31:59.624Z","updated_at":"2026-05-17T01:42:40.850Z","avatar_url":"https://github.com/niqzart.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CA-actions\n\n### Usage\nThis repository has a reusable workflow in it, which you can use in any of your projects. Simplest way is to create a [workflow](https://docs.github.com/en/actions/using-workflows/about-workflows) (e.g. `.github/workflows/main.yml`), specify any [triggers](https://docs.github.com/en/actions/using-workflows/triggering-a-workflow) and call this repository's workflow:\n```yaml\njobs:\n  prepare:\n    uses: niqzart/ca-actions/.github/workflows/full-workflow.yml@v1.0\n    with:\n      # specify arguments here (see documentation below)\n```\n\nThe simplest example of a fully-functional workflow file:\n```yaml\nname: My Workflow\n\non:\n  push:  # will run on any push\n\njobs:\n  prepare:\n    uses: niqzart/ca-actions/.github/workflows/full-workflow.yml@v1.0\n    with:\n      # specify arguments here (see documentation below)\n```\n\n### Multiple problems\nThis workflow runs all steps sequentially (as parallel running is not supported at step level), but it will run all steps if install completes successfully, regardless of other step's results. I.e. if pytest fails, flake8, isort and others will still run and report their errors if there are any, so you can fix all of them at once\n\n### Interpreter \u0026 requirements\n- `python_version`: python version to use, see [setup-python.python-version](https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-input) for more info\n- `package_manager`: name of the package installer/manager to use and cache, see [setup-python.cache](https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages) for more info\n- `install_command`: the command you use to install everything needed for running tests, formatters \u0026 linters. This should install dev-dependencies. The default is `pip install -r requirements.txt`\n\n```yaml\nwith:\n  python_version: 3.11\n  package_manager: poetry  # use poetry instead of pip\n  install_command: poetry install  # install all dependencies normally\n  # ...\n```\n\n### Code path\nIf you want to run all liters and formatters over a specific directory in your repository (e.g. `./backend`), you can pass it (e.g. `backend`) into `lint_directory` parameter. This does not apply to pytest \u0026 coverage runs\n\n```yaml\nwith:\n  # ...\n  lint_directory: app/backend  # only code in app/backend needs linting \u0026 format checking\n```\n\n### Config files\nNormally a project will have just one config file with all settings inside of it (i.e. `pyproject.toml` and `setup.cfg`). If that's the case, you should specify a relative path from the repository's root to that file in the `config_file` parameter (e.g. `pyproject.toml` or `backend/setup.cfg`)\n\nSometimes there could be different config files for different linters (e.g. flake8 doesn't like `pyproject.toml`). In this case you should specify config files on per-step bases using `\u003cstep-name\u003e_config_file` parameter, described in documentation for that step\n\n```yaml\nwith:\n  # ...\n  config_file: backend/pyproject.toml  # all linters use pyproject.toml\n  flake8_config_file: backend/.flake8  # but flake8 uses .flake8\n```\n\n### Extra params\nTo pass any extra parameters to specific steps, you can use `\u003cstep-name\u003e_extra_params` parameter. These parameters will be passed to the command along with the defaults, so you can't override them (might be a future feature)\n\n### Disabling steps\nYou can disable any step in this workflow by passing `\u003cstep-name\u003e: false`:\n```yaml\nwith:\n  # ...\n  mypy: false  # disables mypy\n```\n\n### Running tests with pytest\nStep name: `pytest`\n\n- `pytest_workdir`: choose a directory to run pytest in. Depending on you project structure, tests can be situated in any folder (e.g. `app/backend/tests`) and in order to get working imports you'll need to switch the working directory for the pytest run (e.g. use `app/backend`). Uses `.` by default\n- `pytest_tests`: [specify which tests to run](https://docs.pytest.org/en/7.1.x/how-to/usage.html#specifying-which-tests-to-run)\n\n### Checking code coverage\nStep name: `coverage`\n\nChecks code coverage after running tests. Will report the results to the output of this step and fail the pipeline if `fail-under` is set. For more info on report parameters, visit the [official coverage documentation](https://coverage.readthedocs.io/en/7.2.0/cmd.html#coverage-summary-coverage-report).\n\n- `coverage_path`: relative path from `pytest_workdir` to code that needs to be checked for coverage\n\n### Linting with flake8\nStep name: `flake8`\n\nRuns [flake8](https://flake8.pycqa.org/) and reports the results to the output of this step and fail if flake8 found any non-ignored errors. All configuration for the run can be specified in a configuration file, more info on configuration in the [official documentation](https://flake8.pycqa.org/en/latest/user/configuration.html)\n\nTo use flake8 plugins you should add them to your dev-requirements and pass those in the `install_command` argument [described earlier](#interpreter--requirements). Installed plugins will run automatically\n\n### Check import ordering with isort\nStep name: `isort`\n\nRuns [isort](https://pycqa.github.io/isort/) in check mode to verify the import order and report any problems in the output this step. All configuration for the run can be specified in a configuration file, more info on configuration in the [official documentation](https://pycqa.github.io/isort/docs/configuration/options.html)\n\n### Check formatting with black\nStep name: `black`\n\nRuns [black](https://black.readthedocs.io/en/stable/) in check mode to verify proper code formatting is present and report any problems in the output this step\n\n### Lint with mypy\nStep name: `mypy`\n\nRuns [mypy](https://mypy.readthedocs.io/en/stable/) to check typing and report any problems in the output this step. All configuration for the run can be specified in a configuration file, more info on configuration in the [official documentation](https://mypy.readthedocs.io/en/stable/config_file.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniqzart%2Fca-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniqzart%2Fca-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniqzart%2Fca-actions/lists"}