From 96bcb6c407ac96b3a87948030d7b853828fd0b81 Mon Sep 17 00:00:00 2001 From: Milos Milutinovic Date: Wed, 9 Dec 2020 15:50:04 +0100 Subject: [PATCH] gitlab-ci validate yaml; pre-commit configuration --- .gitlab-ci.yml | 10 ++++++++++ .pre-commit-config.yaml | 5 +++++ pre-commit-requirements.txt | 1 + 3 files changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 .pre-commit-config.yaml create mode 100644 pre-commit-requirements.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..76ecf07 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +--- +stages: + - check-yaml + +check-yaml: + stage: check-yaml + image: python:3.8.3-slim-buster + script: + - pip install pyyaml + - python -c 'import yaml, sys; print(yaml.safe_load(sys.stdin))' < *.ya?ml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b3a8291 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.2.3 + hooks: + - id: check-yaml \ No newline at end of file diff --git a/pre-commit-requirements.txt b/pre-commit-requirements.txt new file mode 100644 index 0000000..e42b23c --- /dev/null +++ b/pre-commit-requirements.txt @@ -0,0 +1 @@ +pre-commit \ No newline at end of file -- GitLab