Skip to content
Snippets Groups Projects

#100: Use extends instead of Yaml anchors

Merged Moul requested to merge 100_extends into dev
1 file
+ 19
14
Compare changes
  • Side-by-side
  • Inline
+ 19
14
@@ -11,7 +11,7 @@ variables:
@@ -11,7 +11,7 @@ variables:
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
# SUB-TASKS
# SUB-TASKS
.push_to_github: &push_to_github
.push_to_github:
variables:
variables:
GIT_STRATEGY: none
GIT_STRATEGY: none
tags:
tags:
@@ -28,7 +28,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
@@ -28,7 +28,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
- mv packed-refs-new packed-refs
- mv packed-refs-new packed-refs
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.pyenv: &pyenv
.pyenv:
tags:
tags:
- redshift-docker-python
- redshift-docker-python
before_script:
before_script:
@@ -37,7 +37,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
@@ -37,7 +37,7 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
- eval "$(pyenv init -)"
- eval "$(pyenv init -)"
- pyenv shell $PYENV_PYTHON_VERSION
- pyenv shell $PYENV_PYTHON_VERSION
.changes: &changes
.changes:
only:
only:
changes:
changes:
- duniterpy/**/*.py
- duniterpy/**/*.py
@@ -50,8 +50,9 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
@@ -50,8 +50,9 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
# TASKS
# TASKS
format:
format:
<<: *pyenv
extends:
<<: *changes
- .pyenv
 
- .changes
stage: format
stage: format
script:
script:
- pyenv shell 3.6.4 # black install and run needs python 3.6.x minimum
- pyenv shell 3.6.4 # black install and run needs python 3.6.x minimum
@@ -59,16 +60,18 @@ format:
@@ -59,16 +60,18 @@ format:
- make check-format
- make check-format
test:
test:
<<: *pyenv
extends:
<<: *changes
- .pyenv
 
- .changes
stage: test
stage: test
script:
script:
- pip install -r requirements.txt
- pip install -r requirements.txt
- make tests
- make tests
check:
check:
<<: *pyenv
extends:
<<: *changes
- .pyenv
 
- .changes
stage: test
stage: test
script:
script:
- pyenv shell 3.6.4 # black install needs python 3.6.x minimum
- pyenv shell 3.6.4 # black install needs python 3.6.x minimum
@@ -78,8 +81,9 @@ check:
@@ -78,8 +81,9 @@ check:
- make pylint
- make pylint
build:
build:
<<: *pyenv
extends:
<<: *changes
- .pyenv
 
- .changes
stage: build
stage: build
script:
script:
- pip install -r requirements.txt
- pip install -r requirements.txt
@@ -87,8 +91,9 @@ build:
@@ -87,8 +91,9 @@ build:
- make build
- make build
release:
release:
<<: *pyenv
extends:
<<: *push_to_github
- .pyenv
 
- .push_to_github
stage: release
stage: release
when: manual
when: manual
script:
script:
@@ -100,7 +105,7 @@ release:
@@ -100,7 +105,7 @@ release:
- tags
- tags
release_test:
release_test:
<<: *pyenv
extends: .pyenv
stage: release
stage: release
when: manual
when: manual
script:
script:
Loading