Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Zialus committed Jan 1, 2021
1 parent e9ba277 commit 8c77ae8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 11 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: CI
'on':
pull_request:
push:
schedule:
- cron: "30 2 * * 5"

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint ansible-lint

- name: Lint code.
run: |
yamllint .
ansible-lint
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
# - centos8
- centos7
- ubuntu2004
- ubuntu1804
- debian10
- debian9

steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install molecule[docker,lint,test]

- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ driver:
name: docker
platforms:
- name: instance
image: docker.io/pycontribs/centos:8
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
pre_build_image: true
provisioner:
name: ansible
Expand Down
10 changes: 0 additions & 10 deletions molecule/default/verify.yml

This file was deleted.

0 comments on commit 8c77ae8

Please sign in to comment.