Skip to content

Commit

Permalink
Merge pull request #27 from mrlesmithjr/feature/refactoring
Browse files Browse the repository at this point in the history
Feature/refactoring
  • Loading branch information
mrlesmithjr authored Aug 17, 2020
2 parents 62dc6d1 + 52b3724 commit a66ef1e
Show file tree
Hide file tree
Showing 23 changed files with 814 additions and 68 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
exclude = venv/
31 changes: 15 additions & 16 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,31 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.5, 3.6, 3.7]
molecule_distro:
- centos7
- centos8
- debian9
- debian10
- fedora
- ubuntu1604
- ubuntu1804
- ubuntu2004

steps:
- uses: actions/checkout@v1
with:
path: ansible-dnsmasq
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: "3.x"
- name: Install dependencies
run: |
sudo apt install docker
python -m pip install --upgrade pip
pip3 install -r requirements.txt
python -m pip install --upgrade pip pip-tools
pip-sync requirements.txt requirements-dev.txt
ansible --version
molecule --version
- name: Test with molecule
run: |
molecule test --scenario-name centos7
# molecule test --scenario-name centos8
# molecule test --scenario-name debian8
molecule test --scenario-name debian9
molecule test --scenario-name debian10
molecule test --scenario-name fedora
molecule test --scenario-name ubuntu1604
molecule test --scenario-name ubuntu1804
molecule test --scenario-name ${{ matrix.molecule_distro }}
47 changes: 42 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,62 @@ image: docker:git
services:
- docker:dind

stages:
- molecule-test

before_script:
- apk update && apk add --no-cache docker
python3-dev py3-pip docker gcc git curl build-base
autoconf automake py3-cryptography linux-headers
musl-dev libffi-dev openssl-dev openssh
- docker info
- python3 --version
- pip3 install -r requirements.txt
- pip3 install --upgrade pip pip-tools
- pip-sync requirements.txt requirements-dev.txt
- ansible --version
- molecule --version

molecule:
stage: test
centos7:
stage: molecule-test
script:
- molecule test --scenario-name centos7
# - molecule test --scenario-name centos8
# - molecule test --scenario-name debian8

centos8:
stage: molecule-test
script:
- molecule test --scenario-name centos8

debian8:
stage: molecule-test
script:
- molecule test --scenario-name debian8

debian9:
stage: molecule-test
script:
- molecule test --scenario-name debian9

debian10:
stage: molecule-test
script:
- molecule test --scenario-name debian10

fedora:
stage: molecule-test
script:
- molecule test --scenario-name fedora

ubuntu1604:
stage: molecule-test
script:
- molecule test --scenario-name ubuntu1604

ubuntu1804:
stage: molecule-test
script:
- molecule test --scenario-name ubuntu1804

ubuntu2004:
stage: molecule-test
script:
- molecule test --scenario-name ubuntu2004
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ services:
- docker
before_install:
- sudo apt-get -qq update
env:
- molecule_distro=centos7
- molecule_distro=centos8
- molecule_distro=debian8
- molecule_distro=debian9
- molecule_distro=debian10
- molecule_distro=fedora
- molecule_distro=ubuntu1604
- molecule_distro=ubuntu1804
- molecule_distro=ubuntu2004
install:
- pip3 install -r requirements.txt
- pip3 install --upgrade pip pip-tools
- pip-sync requirements.txt requirements-dev.txt
- ansible --version
- molecule --version
script:
- molecule test --scenario-name centos7
# - molecule test --scenario-name centos8
# - molecule test --scenario-name debian8
- molecule test --scenario-name debian9
- molecule test --scenario-name debian10
- molecule test --scenario-name fedora
- molecule test --scenario-name ubuntu1604
- molecule test --scenario-name ubuntu1804
- molecule test --scenario-name "$molecule_distro"
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
Loading

0 comments on commit a66ef1e

Please sign in to comment.