Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/botcity-dev/botcity-reusable-workflows
Reusable workflow actions to Botcity
https://github.com/botcity-dev/botcity-reusable-workflows
Last synced: about 1 month ago
JSON representation
Reusable workflow actions to Botcity
- Host: GitHub
- URL: https://github.com/botcity-dev/botcity-reusable-workflows
- Owner: botcity-dev
- Created: 2022-12-20T13:11:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T00:58:15.000Z (10 months ago)
- Last Synced: 2024-04-28T03:21:46.856Z (8 months ago)
- Size: 36.1 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Botcity Reusable Workflows
To facilitate the implementation of workflows shared by all botcity projects, it is necessary to include it in this project, for example the ci, linter and publish in pypi workflows.
## Available workflows| Name | Language | Arguments | Secrets | Description |
|-----------------|----------|-----------------------------------------------------------------------------------|------------------|----------------------------------------|
| **ci** | python | list_os_name, list_python_version | | Run tests in pytest |
| **linter** | python | flake8, mypy, list_os_name, list_python_version, docstring, docstring_convention | | Run flake8, mypy and flake8-docstring. |
| **pypi_upload** | python | | PYPI_API_TOKEN | Build package and publish in pypi |## Using reusable workflows example
## Workflows
### Python
#### ci
Using values default:```yml
name: cion:
push:
pull_request:jobs:
ci:
uses: botcity-dev/botcity-reusable-workflows/.github/workflows/python_ci.yml@latest```
Using passing the arguments:| Name | Description | Default | Required |
|---------------------|--------------------------------------|---------------------|----------|
| list_os_name | List os name to use in matrix | "['ubuntu-latest']" | false |
| list_python_version | List version python to use in matrix | "['3.9', 3.12']" | false |```yml
name: cion:
push:
pull_request:jobs:
ci:
uses: botcity-dev/botcity-reusable-workflows/.github/workflows/python_ci.yml@latest
with:
list_os_name: "['ubuntu-latest', 'windows-latest']"
list_python_version: "['3.9', '3.10', '3.12']"
```#### Linter
Using values default:```yml
name: linteron:
push:
pull_request:jobs:
linter:
uses: botcity-dev/botcity-reusable-workflows/.github/workflows/python_linter.yml@latest```
Using passing the arguments:| Name | Description | Default | Required |
|----------------------|--------------------------------------|---------------------|----------|
| list_os_name | List os name to use in matrix | "['ubuntu-latest']" | false |
| list_python_version | List version python to use in matrix | "['3.9']" | false |
| mypy | Execute mypy or no | false | false |
| flake8 | Execute flake8 or no | true | false |
| docstring | Execute flake8-docstring or no. | false | false |
| folder | Folder to execute flake8 and mypy | "botcity" | false |
| docstring_convention | Convention that will be used. | "google" | false |```yml
name: linteron:
push:
pull_request:jobs:
linter:
uses: botcity-dev/botcity-reusable-workflows/.github/workflows/python_linter.yml@latest
with:
list_os_name: "['ubuntu-latest', 'windows-latest']"
list_python_version: "['3.9', '3.12']"
flake8: true
mypy: true
folder: "botcity"
docstring: true
docstring_convention: "google"
```#### Pypi upload
Using secrets required:
| Name | Description | Default | Required |
|---------------------|----------------------|---------|------------|
| PYPI_API_TOKEN | Token to upload pipy | | ** true ** |```yml
name: Publish Python distributions to PyPIon:
release:
types: [published]jobs:
pypi_upload:
uses: botcity-dev/botcity-reusable-workflows/.github/workflows/python_pypi_upload.yml@latest
with:
list_version: "['3.9', '3.8']"
secrets: inherit # Or ${{ secrets.PYPI_API_TOKEN }}
```