ci.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ---
  2. name: CI
  3. 'on':
  4. pull_request:
  5. push:
  6. branches:
  7. - master
  8. schedule:
  9. - cron: "30 5 * * 2"
  10. defaults:
  11. run:
  12. working-directory: 'geerlingguy.haproxy'
  13. jobs:
  14. lint:
  15. name: Lint
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Check out the codebase.
  19. uses: actions/checkout@v2
  20. with:
  21. path: 'geerlingguy.haproxy'
  22. - name: Set up Python 3.
  23. uses: actions/setup-python@v2
  24. with:
  25. python-version: '3.x'
  26. - name: Install test dependencies.
  27. run: pip3 install yamllint
  28. - name: Lint code.
  29. run: |
  30. yamllint .
  31. molecule:
  32. name: Molecule
  33. runs-on: ubuntu-latest
  34. strategy:
  35. matrix:
  36. distro:
  37. - rockylinux8
  38. - ubuntu2004
  39. steps:
  40. - name: Check out the codebase.
  41. uses: actions/checkout@v2
  42. with:
  43. path: 'geerlingguy.haproxy'
  44. - name: Set up Python 3.
  45. uses: actions/setup-python@v2
  46. with:
  47. python-version: '3.x'
  48. - name: Install test dependencies.
  49. run: pip3 install ansible molecule[docker] docker
  50. - name: Run Molecule tests.
  51. run: molecule test
  52. env:
  53. PY_COLORS: '1'
  54. ANSIBLE_FORCE_COLOR: '1'
  55. MOLECULE_DISTRO: ${{ matrix.distro }}