Skip to content

Commit

Permalink
refactor: merge gitlab ci files
Browse files Browse the repository at this point in the history
  • Loading branch information
pppmlt committed Aug 11, 2023
1 parent 2f2e81e commit 0c83168
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
2 changes: 0 additions & 2 deletions {{cookiecutter.repo_name}}/.gitlab-ci-stages.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions {{cookiecutter.repo_name}}/.gitlab-ci-test.yaml

This file was deleted.

32 changes: 27 additions & 5 deletions {{cookiecutter.repo_name}}/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# the ci configuration is split into multiple files
# this allows the semantic versioning (versioning the template itself) to be easily removed
include:
- .gitlab-ci-stages.yaml
- .gitlab-ci-test.yaml
stages:
- test

.setup_python_env: &setup_python_env
before_script:
- apt-get update && apt-get install -y --no-install-recommends git-core ca-certificates git-lfs
- conda env create -f environment.yaml --name=conda_env
- conda init bash
- source ~/.bashrc
- conda activate conda_env
- pre-commit install

format_and_lint:
stage: test
image: continuumio/miniconda3
<<: *setup_python_env
script:
- pre-commit run --hook-stage manual --all-files
- git fetch
- chmod a+x check_commit_msgs.sh
- ./check_commit_msgs.sh -c "remotes/origin/${CI_COMMIT_BRANCH}" -m "remotes/origin/${CI_DEFAULT_BRANCH}"
rules:
- if: $CI_COMMIT_TAG
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: always

0 comments on commit 0c83168

Please sign in to comment.