Skip to content

Move CI from Travis to GitHub #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: CI

on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
ansible-lint-rules:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install ansible-lint
run: |
python -m pip install --upgrade pip
pip install ansible==2.9.* ansible-lint==4.*

- name: Run ansible-lint
run: |
if ansible-lint -R -r ./rules tests/positive/*.yml; then echo "Positive tests OK"; (exit 0); else if [ $? -eq 2 ]; then echo "Positive tests is failed"; (exit 1); else echo "You rules is broken"; (exit 1); fi; fi
if ansible-lint -R -r ./rules tests/negative/*.yml; then echo "Negative tests failed"; (exit 1); else if [ $? -eq 2 ]; then echo "Negative tests OK"; (exit 0); else echo "You rules is broken"; (exit 1); fi; fi
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ Rules for ansible-lint |travisstatus|
.. |travisstatus| image:: https://travis-ci.org/lean-delivery/ansible-lint-rules.svg?branch=master
:target: https://travis-ci.org/lean-delivery/ansible-lint-rules

This is a rule set for `ansible-lint <https://github.com/willthames/ansible-lint>`_ .
.. |ansible-lint version| image:: https://img.shields.io/pypi/v/ansible-lint/4.3.7.svg
:target: https://pypi.org/project/ansible-lint/4.3.7

This is a rule set for `ansible-lint <https://github.com/willthames/ansible-lint>`_ |ansible-lint version|

This rule set doesn't support ansible-lint version higher than 4.3.7


How to use
----------------
Expand Down