Pārlūkot izejas kodu

Adds ansible testing to PRs

Runs ansible-lint and syntax checks playbooks for all
PRs.
Antony Messerli 5 gadi atpakaļ
vecāks
revīzija
143462675b
1 mainītis faili ar 12 papildinājumiem un 2 dzēšanām
  1. 12 2
      .travis.yml

+ 12 - 2
.travis.yml

@@ -11,6 +11,16 @@ env:
 
 jobs:
   include:
+    - stage: test
+      if: type = pull_request
+      language: python
+      install:
+        - pip install ansible ansible-lint
+        - ansible-lint --version
+      script:
+        - ansible-playbook -i inventory site.yml --syntax-check
+        - ansible-lint -v roles/netbootxyz
+
     - stage: development
       if: branch = development AND type != pull_request
       script:
@@ -31,13 +41,11 @@ jobs:
       after_deploy:
         - ./script/message dev-push
 
-
     - stage: pull-request
       if: type = pull_request
       script:
         - ./script/build_release pr
 
-
     - stage: release-candidate
       if: branch = RC AND type != pull_request
       before_install:
@@ -74,6 +82,7 @@ jobs:
           skip_cleanup: true
           on:
             branch: RC
+
     - stage: rc-github
       if: branch = RC AND type != pull_request
       before_install:
@@ -131,6 +140,7 @@ jobs:
           skip_cleanup: true
           on:
             branch: master
+
     - stage: release-github
       if: branch = master AND type != pull_request
       before_install: