Skip to content
Snippets Groups Projects
Commit 5d71487d authored by Moul's avatar Moul
Browse files

[enh] CI: #100: Use extends instead of Yaml anchors

- `extends` feature comes with GitLab 12.0
- https://docs.gitlab.com/ee/ci/yaml/#extends
parent 23a5ab48
No related branches found
No related tags found
1 merge request!75#100: Use extends instead of Yaml anchors
Pipeline #6103 passed
...@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment