Name | actionlint-py JSON |
Version |
1.7.4.20
JSON |
| download |
home_page | None |
Summary | Python wrapper around invoking actionlint (https://github.com/rhysd/actionlint) |
upload_time | 2024-11-25 20:13:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2019 Ryan Rhee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
> Note: for `pre-commit` hooks I recommend officially supported hooks:
> See docs: https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit
# actionlint-py
A python wrapper to provide a pip-installable [actionlint] binary.
Internally this package provides a convenient way to download the pre-built
actionlint binary for your particular platform.
### Installation
```bash
pip install actionlint-py
```
### Usage
After installation, the `actionlint` binary should be available in your
environment (or `actionlint.exe` on windows). Remember to add you `Scripts` folder to `PATH`.
### As a pre-commit hook
See [pre-commit] for introduction.
**I recommend using officially supported pre-commit hooks from actionlint itself**
See docs: https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit
Use this repo if you can not use officially supported hooks (docker, golang, system) and you are fine with python `pip` wrapper.
Sample `.pre-commit-config.yaml` using `pip` as package manager:
```yaml
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: v1.7.4.18
hooks:
- id: actionlint
additional_dependencies: [ pyflakes>=3.0.1, shellcheck-py>=0.9.0.5 ]
# actionlint has built in support for pyflakes and shellcheck, sadly they will not be auto updated. Check https://pypi.org/project/actionlint-py/ for latest version. Alternatively:
# args: [-shellcheck=/path/shellcheck -pyflakes=/path/pyflakes]
# note - invalid path in arguments will fail silently
```
Because `actionlint-py` is available as source distribution, pip build system will fetch binary from (public)
github. It might cause problems with corporate proxy. In case of problems try this semi-manual setup that respects
your `pip.ini`:
```yaml
- repo: local
hooks:
- id: actionlint
name: actionlint
description: Lint GitHub workflows with actionlint
additional_dependencies: [ actionlint-py ]
#additional_dependencies: [actionlint-py==1.7.4.18]
# safer, but pre-commit autoupdate will not work
# note: the pip versioning scheme is different from actionlint binary: not "v1.7.4" but "1.7.4.18" (last number is build system version)
entry: actionlint
#args: [-ignore "*.set-output. was depracated.*"]
language: python
types: [ "yaml" ]
files: "^.github/workflows/"
```
[actionlint]: https://github.com/rhysd/actionlint
[pre-commit]: https://pre-commit.com
## Alternative methods of running actionlint
### As pre-commit hooks
See [official docs for pre-commit integration](https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit)
```yaml
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
# - id: actionlint-docker
# - id: actionlint-system
```
### Use as github action step
Use directly in github action, see
[official docs for github action integration](https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions):
```yaml
name: Lint GitHub Actions workflows
on: [ push, pull_request ]
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
```
Or using docker:
```yaml
name: Lint GitHub Actions workflows
on: [ push, pull_request ]
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check workflow files
uses: docker://rhysd/actionlint:latest
with:
args: -color
```
# Development
Development of wrapper and releasing new version:
see [README-DEV.md](https://github.com/Mateusz-Grzelinski/actionlint-py/blob/main/README-DEV.md)
# Roadmap
- [x] Add actionlint hook as docker
- [x] support `shellcheck-py` in docker image
- [ ] auto update docker version in `.pre-commit-hooks.yaml` when using `_custom_build/auto_update_main.py`
- [x] add `shellcheck-py` as dependency (or at least document)
- [x] Update tag in readme in github action when releasing new version
- [ ] Upload also binary distribution, not only source distribution
- [ ] Add unit tests to build system
See [README-DEV.md](https://github.com/Mateusz-Grzelinski/actionlint-py/blob/main/README-DEV.md) for more TODOs.
Won't do unless asked:
- support all platforms that actionlint supports (like freebsd)
Raw data
{
"_id": null,
"home_page": null,
"name": "actionlint-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Mateusz Grzeli\u0144ski <grzelinskimat@gmail.com>",
"keywords": null,
"author": null,
"author_email": "Ryan Rhee <pypi@rhee.io>, Mateusz Grzeli\u0144ski <grzelinskimat@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1c/00/7c2032bfd13ba9fab3c965f17505f600c9c5bee9e9beec81a753db077e42/actionlint_py-1.7.4.20.tar.gz",
"platform": null,
"description": "> Note: for `pre-commit` hooks I recommend officially supported hooks:\n> See docs: https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit\n\n# actionlint-py\n\nA python wrapper to provide a pip-installable [actionlint] binary.\n\nInternally this package provides a convenient way to download the pre-built\nactionlint binary for your particular platform.\n\n### Installation\n\n```bash\npip install actionlint-py\n```\n\n### Usage\n\nAfter installation, the `actionlint` binary should be available in your\nenvironment (or `actionlint.exe` on windows). Remember to add you `Scripts` folder to `PATH`.\n\n### As a pre-commit hook\n\nSee [pre-commit] for introduction.\n\n**I recommend using officially supported pre-commit hooks from actionlint itself**\nSee docs: https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit\n\nUse this repo if you can not use officially supported hooks (docker, golang, system) and you are fine with python `pip` wrapper.\n\nSample `.pre-commit-config.yaml` using `pip` as package manager:\n\n```yaml\n- repo: https://github.com/Mateusz-Grzelinski/actionlint-py\n rev: v1.7.4.18\n hooks:\n - id: actionlint\n additional_dependencies: [ pyflakes>=3.0.1, shellcheck-py>=0.9.0.5 ]\n # actionlint has built in support for pyflakes and shellcheck, sadly they will not be auto updated. Check https://pypi.org/project/actionlint-py/ for latest version. Alternatively:\n # args: [-shellcheck=/path/shellcheck -pyflakes=/path/pyflakes]\n # note - invalid path in arguments will fail silently\n```\n\nBecause `actionlint-py` is available as source distribution, pip build system will fetch binary from (public)\ngithub. It might cause problems with corporate proxy. In case of problems try this semi-manual setup that respects\nyour `pip.ini`:\n\n```yaml\n- repo: local\n hooks:\n - id: actionlint\n name: actionlint\n description: Lint GitHub workflows with actionlint\n additional_dependencies: [ actionlint-py ]\n #additional_dependencies: [actionlint-py==1.7.4.18]\n # safer, but pre-commit autoupdate will not work\n # note: the pip versioning scheme is different from actionlint binary: not \"v1.7.4\" but \"1.7.4.18\" (last number is build system version)\n entry: actionlint\n #args: [-ignore \"*.set-output. was depracated.*\"]\n language: python\n types: [ \"yaml\" ]\n files: \"^.github/workflows/\"\n```\n\n[actionlint]: https://github.com/rhysd/actionlint\n\n[pre-commit]: https://pre-commit.com\n\n## Alternative methods of running actionlint\n\n### As pre-commit hooks\n\nSee [official docs for pre-commit integration](https://github.com/rhysd/actionlint/blob/main/docs/usage.md#pre-commit)\n\n```yaml\n- repo: https://github.com/rhysd/actionlint\n rev: v1.7.4\n hooks:\n - id: actionlint\n # - id: actionlint-docker\n # - id: actionlint-system\n```\n\n### Use as github action step\n\nUse directly in github action, see\n[official docs for github action integration](https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions):\n\n```yaml\nname: Lint GitHub Actions workflows\non: [ push, pull_request ]\n\njobs:\n actionlint:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v3\n - name: Download actionlint\n id: get_actionlint\n run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n shell: bash\n - name: Check workflow files\n run: ${{ steps.get_actionlint.outputs.executable }} -color\n shell: bash\n```\n\nOr using docker:\n\n```yaml\nname: Lint GitHub Actions workflows\non: [ push, pull_request ]\n\njobs:\n actionlint:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v3\n - name: Check workflow files\n uses: docker://rhysd/actionlint:latest\n with:\n args: -color\n```\n\n# Development\n\nDevelopment of wrapper and releasing new version:\nsee [README-DEV.md](https://github.com/Mateusz-Grzelinski/actionlint-py/blob/main/README-DEV.md)\n\n# Roadmap\n\n- [x] Add actionlint hook as docker\n - [x] support `shellcheck-py` in docker image\n - [ ] auto update docker version in `.pre-commit-hooks.yaml` when using `_custom_build/auto_update_main.py`\n- [x] add `shellcheck-py` as dependency (or at least document)\n- [x] Update tag in readme in github action when releasing new version\n- [ ] Upload also binary distribution, not only source distribution\n- [ ] Add unit tests to build system\n\nSee [README-DEV.md](https://github.com/Mateusz-Grzelinski/actionlint-py/blob/main/README-DEV.md) for more TODOs.\n\nWon't do unless asked:\n\n- support all platforms that actionlint supports (like freebsd)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2019 Ryan Rhee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Python wrapper around invoking actionlint (https://github.com/rhysd/actionlint)",
"version": "1.7.4.20",
"project_urls": {
"Bug Reports": "https://github.com/Mateusz-Grzelinski/actionlint-py/issues",
"Homepage": "https://github.com/Mateusz-Grzelinski/actionlint-py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c007c2032bfd13ba9fab3c965f17505f600c9c5bee9e9beec81a753db077e42",
"md5": "99cec9c5fc45e9b710ed1afeb855ab41",
"sha256": "8b7e07278159b043a48c1459d2b9cc5d2c4f5b0cda96556c29162a53961526e3"
},
"downloads": -1,
"filename": "actionlint_py-1.7.4.20.tar.gz",
"has_sig": false,
"md5_digest": "99cec9c5fc45e9b710ed1afeb855ab41",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 11838,
"upload_time": "2024-11-25T20:13:51",
"upload_time_iso_8601": "2024-11-25T20:13:51.883748Z",
"url": "https://files.pythonhosted.org/packages/1c/00/7c2032bfd13ba9fab3c965f17505f600c9c5bee9e9beec81a753db077e42/actionlint_py-1.7.4.20.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 20:13:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Mateusz-Grzelinski",
"github_project": "actionlint-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "actionlint-py"
}