post_gen_project should refer to python_reusable without ci_ prefix #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Top-level CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: main # Comment this line if you want to test the CI before opening a PR | |
jobs: | |
ci-global: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
timeout-minutes: 5 | |
with: | |
python-version-file: .python-version | |
cache: 'pip' | |
cache-dependency-path: | | |
pip-requirements.txt | |
dev-requirements.txt | |
- name: Install Python dependencies | |
run: | | |
pip install -r pip-requirements.txt | |
pip install -r dev-requirements.txt | |
# in order to test the template as well, we create a temporary library in the CI | |
- name: Create library with template | |
run: | | |
cookiecutter --no-input templates/pylibrary --output-dir libs/ | |
git add libs/library_name # So that checks below apply to generated library | |
- name: Format Python imports | |
run: | | |
isort --check-only $(git ls-files "*.py") | |
- name: Format Python | |
run: | | |
black --check $(git ls-files "*.py") | |
- name: Lint Python | |
run: | | |
flake8 $(git ls-files "*.py") | |
# Are all public symbols documented? (see top-level pyproject.toml configuration) | |
- name: Lint Python doc | |
run: | | |
pylint $(git ls-files "*.py") |