Initial upload: Project Scaffold CLI with multi-language templates and CI/CD
This commit is contained in:
43
project_scaffold_cli/templates/ci/.gitlab-ci.yml.j2
Normal file
43
project_scaffold_cli/templates/ci/.gitlab-ci.yml.j2
Normal file
@@ -0,0 +1,43 @@
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
- build
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
image: python:3.11
|
||||
script:
|
||||
- pip install flake8 black
|
||||
- flake8 .
|
||||
- black --check .
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: python:3.11
|
||||
script:
|
||||
- pip install -e ".[dev]"
|
||||
- pytest -v --cov={{ project_slug }} --cov-report=html
|
||||
artifacts:
|
||||
reports:
|
||||
junit: test-results.xml
|
||||
paths:
|
||||
- htmlcov/
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: python:3.11
|
||||
script:
|
||||
- pip install build
|
||||
- python -m build
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/
|
||||
only:
|
||||
- main
|
||||
- tags
|
||||
Reference in New Issue
Block a user