diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..6e4eb0569f624818103c900ec1d607dc978a45bb --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,57 @@ +--- +stages: + - lint + - test + +pre-commit: + stage: lint + image: adarnimrod/ci-images:pre-commit + variables: &variables + XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" + LANG: C.UTF-8 + script: + - pre-commit run -a + cache: &cache + key: "$CI_JOB_NAME" + paths: + - .cache/ + +python2.7: + stage: test + image: $project:$version-slim + allow_failure: true + before_script: &before_script + - pip install docutils + script: &script + - $project setup.py check -mrs + - pip install ./ + variables: *variables + cache: *cache + parallel: + matrix: + - project: python + version: + - "2.7" + - project: pypy + version: + - "2.7" + +python3: + stage: test + image: $project:$version-slim + before_script: *before_script + script: *script + variables: *variables + cache: *cache + parallel: + matrix: + - project: python + version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - project: pypy + version: + - "3.6" + - "3.7" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f2941a12ca98ab9ab6e2aa3a17f0a672799209c8..6b0e17627bcf155100380d9071274483926c18dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,18 +2,18 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 + rev: v3.3.0 hooks: - id: check-added-large-files - id: check-merge-conflict - id: detect-private-key - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks-markup - rev: v1.0.0 + rev: v1.0.1 hooks: - id: rst-linter - repo: https://github.com/adrienverge/yamllint - rev: v1.21.0 + rev: v1.25.0 hooks: - id: yamllint - repo: https://github.com/amperser/proselint/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 54f57817f9758b75f642d49936783bbf97deb9c7..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -language: python -python: - - "2.7" - - "3.5" - - "3.6" - - "3.7" - - "3.8" -dist: bionic -sudo: false -group: beta -cache: - - pip - - directories: - - $HOME/.pre-commit - -install: - - pip install pre-commit docutils - -script: - - pre-commit run --all-files - - python setup.py check -mrs - - pip install ./ - -notifications: - email: false diff --git a/README.rst b/README.rst index 6522788c4515032fdbc2d5a661bcc462ddd0a96f..3c5f0a131d9bdcd1a3698c4897f6aed4d2819ecc 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,9 @@ Ansible pre-commit hooks ######################## -.. image:: https://travis-ci.org/adarnimrod/ansible-pre-commit.svg?branch=master - :target: https://travis-ci.org/adarnimrod/ansible-pre-commit +.. image:: https://git.shore.co.il/ansible/ansible-pre-commit/badges/master/pipeline.svg + :target: https://git.shore.co.il/ansible/ansible-pre-commit/-/commits/master + :alt: CI status Ansible `pre-commit <http://pre-commit.com/>`_ hooks. @@ -15,7 +16,7 @@ Requirements ------------ - Pre-commit 1.2 or later. -- Python 2.7 or 3.4 or later. +- Python 2.7 or 3.6 or later. Installation ------------ @@ -24,7 +25,7 @@ Add the following to your :code:`.pre-commit-config.yaml`: .. code:: yaml - - repo: https://www.shore.co.il/git/ansible-pre-commit/ + - repo: https://git.shore.co.il/ansible/ansible-pre-commit.git sha: v0.9.0 hooks: - id: ansible-syntax-check @@ -53,4 +54,4 @@ Author Information Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website <https://www.shore.co.il/>`_. Patches are welcome via `git send-email <http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located -at: https://www.shore.co.il/git/. +at: https://git.shore.co.il/explore/. diff --git a/setup.py b/setup.py index cbbe0dae6b983e4e1c86ca36374579ab6291893c..2df076438f91fda31d25a26856b51e6e7b94e17c 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name="pre_commit_ansible_dummy_package", - url="https://www.shore.co.il/git/ansible-pre-commit", + url="https://git.shore.co.il/ansible/ansible-pre-commit", author="Nimrod Adar", author_email="nimrod@shore.co.il", version=open("VERSION", "r").read().strip(),