]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: use github workflow for ansible-lint
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 1 Oct 2020 08:23:22 +0000 (10:23 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 23 Nov 2020 07:33:47 +0000 (08:33 +0100)
let's use github workflow instead of travis.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
.github/workflows/ansible-lint.yml [new file with mode: 0644]
.travis.yml

diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml
new file mode 100644 (file)
index 0000000..843f404
--- /dev/null
@@ -0,0 +1,18 @@
+name: ansible-lint
+on: [pull_request]
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [ '3.6', '3.7', '3.8' ]
+    name: Python ${{ matrix.python-version }}
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup python
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+          architecture: x64
+      - run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint
+      - run: ansible-lint -x 106,204,205,208 -v --force-color ./roles/*/ ./infrastructure-playbooks/*.yml site-container.yml.sample site-container.yml.sample
\ No newline at end of file
index e8d4b2f4441141787f525c322852d115e0ba9d17..df3e1f2eece80f8a2bba9fd1a72f3073756027dc 100644 (file)
@@ -7,7 +7,5 @@ notifications:
   webhooks: https://galaxy.ansible.com/api/v1/notifications/
 install:
   - pip install -r tests/requirements.txt
-  - pip install ansible-lint==4.2.0
 script:
   - if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
-  - for i in $(ls -1 roles/); do ANSIBLE_LOG_PATH=/dev/null ansible-lint -x 204 -v roles/$i/; if [ $? -ne 0 ]; then exit 1; fi; done