Skip to content
Snippets Groups Projects
Commit 1d0f649d authored by nimrod's avatar nimrod
Browse files

Migrate to GitLab.

Include GitLab CI.
parent 8ad24294
No related branches found
No related tags found
No related merge requests found
Pipeline #173 passed
---
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
- |
if [ "$project" = "pypy" ]
then
apt-get update
apt-get install -y build-essential libssl-dev
fi
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"
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
--- ---
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0 rev: v3.3.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup - repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.0 rev: v1.0.1
hooks: hooks:
- id: rst-linter - id: rst-linter
- repo: https://github.com/adrienverge/yamllint - repo: https://github.com/adrienverge/yamllint
rev: v1.21.0 rev: v1.25.0
hooks: hooks:
- id: yamllint - id: yamllint
- repo: https://github.com/amperser/proselint/ - repo: https://github.com/amperser/proselint/
......
---
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
Ansible pre-commit hooks Ansible pre-commit hooks
######################## ########################
.. image:: https://travis-ci.org/adarnimrod/ansible-pre-commit.svg?branch=master .. image:: https://git.shore.co.il/ansible/ansible-pre-commit/badges/master/pipeline.svg
:target: https://travis-ci.org/adarnimrod/ansible-pre-commit :target: https://git.shore.co.il/ansible/ansible-pre-commit/-/commits/master
:alt: CI status
Ansible `pre-commit <http://pre-commit.com/>`_ hooks. Ansible `pre-commit <http://pre-commit.com/>`_ hooks.
...@@ -15,7 +16,7 @@ Requirements ...@@ -15,7 +16,7 @@ Requirements
------------ ------------
- Pre-commit 1.2 or later. - Pre-commit 1.2 or later.
- Python 2.7 or 3.4 or later. - Python 2.7 or 3.6 or later.
Installation Installation
------------ ------------
...@@ -24,7 +25,7 @@ Add the following to your :code:`.pre-commit-config.yaml`: ...@@ -24,7 +25,7 @@ Add the following to your :code:`.pre-commit-config.yaml`:
.. code:: 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 sha: v0.9.0
hooks: hooks:
- id: ansible-syntax-check - id: ansible-syntax-check
...@@ -53,4 +54,4 @@ Author Information ...@@ -53,4 +54,4 @@ Author Information
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email <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 <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/.
...@@ -3,7 +3,7 @@ from setuptools import setup ...@@ -3,7 +3,7 @@ from setuptools import setup
setup( setup(
name="pre_commit_ansible_dummy_package", 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="Nimrod Adar",
author_email="nimrod@shore.co.il", author_email="nimrod@shore.co.il",
version=open("VERSION", "r").read().strip(), version=open("VERSION", "r").read().strip(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment