From 65319a843865214c3777a08e4d77fbb6d5fbd428 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Tue, 10 Oct 2023 23:25:49 +1300 Subject: [PATCH] Add CI --- .woodpecker/lint.yml | 17 +++++++++++++++++ .woodpecker/test.yml | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .woodpecker/lint.yml create mode 100644 .woodpecker/test.yml diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..9660019 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,17 @@ +steps: + ansible-lint: + group: test + name: "Lint: Ansible-lint" + image: guisea/ansible-molecule + commands: + - ansible-lint -c ".ansible-lint" + when: + event: push + yamllint: + group: test + name: "Lint: Yamllint" + image: guisea/ansible-molecule + commands: + - yamllint . + when: + event: push diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..532ce23 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,21 @@ +matrix: + MOLECULE_DISTRO: + - centos7 + - almalinux8 + +steps: + test: + name: Test on ${MOLECULE_DISTRO} + image: guisea/ansible-molecule + pull: true + environment: + ANSIBLE_CALLBACK_WHITELIST: profile_tasks + EPEL_MIRROR_URL: https://mirrors.guise.net.nz/epel + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - molecule test --all + when: + event: push +depends_on: + - lint