-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Oefenweb/make-use-of-github-actions
Make use of Github actions
- Loading branch information
Showing
16 changed files
with
202 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
warn_list: | ||
- '106' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
name: CI | ||
'on': | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '30 1 * * 3' | ||
|
||
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: pip install ansible-lint[community,yamllint] | ||
|
||
- name: Lint code | ||
run: | | ||
yamllint . | ||
ansible-lint | ||
molecule: | ||
name: Molecule | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "${{ github.repository }}" | ||
needs: | ||
- lint | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- distro: debian8 | ||
- distro: debian9 | ||
- distro: debian10 | ||
- distro: ubuntu1604 | ||
ansible-version: '>=2.8, <2.9' | ||
- distro: ubuntu1604 | ||
ansible-version: '>=2.9, <2.10' | ||
- distro: ubuntu1604 | ||
ansible-version: '>=2.10, <2.11' | ||
- distro: ubuntu1604 | ||
- distro: ubuntu1804 | ||
- distro: ubuntu2004 | ||
|
||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install test dependencies | ||
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker | ||
|
||
- name: Run Molecule tests | ||
run: | | ||
molecule test | ||
env: | ||
ANSIBLE_FORCE_COLOR: '1' | ||
ANSIBLE_VERBOSITY: '2' | ||
MOLECULE_DEBUG: '1' | ||
MOLECULE_DISTRO: "${{ matrix.distro }}" | ||
PY_COLORS: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Release | ||
'on': | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Publish to Galaxy | ||
uses: robertdebock/galaxy-action@1.1.0 | ||
with: | ||
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
line-length: disable | ||
truthy: disable | ||
|
||
ignore: | | ||
.tox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ galaxy_info: | |
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- xenial | ||
- bionic | ||
- focal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
pre_tasks: | ||
- name: include vars | ||
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml" | ||
roles: | ||
- ../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
prepare: prepare.yml | ||
converge: converge.yml | ||
verify: verify.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: include vars | ||
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml" | ||
- name: include tasks | ||
include: "{{ playbook_dir }}/../../tests/tasks/pre.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: include vars | ||
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml" | ||
- name: include tasks | ||
include: "{{ playbook_dir }}/../../tests/tasks/post.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# post test file | ||
--- | ||
- name: post | install dependencies | ||
- name: install test dependencies | ||
apt: | ||
name: | ||
- curl | ||
state: "{{ apt_install_state | default('latest') }}" | ||
update_cache: true | ||
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" | ||
|
||
- name: post | test installation | ||
- name: test tinyproxy installation | ||
command: > | ||
curl -sL --head https://www.google.com --proxy http://127.0.0.1:3128 | ||
curl -sL --head https://www.google.com --proxy http://{{ ansible_lo['ipv4']['address'] }}:{{ tinyproxy_port }} | ||
args: | ||
warn: false | ||
register: _result | ||
changed_when: false | ||
failed_when: _result.stdout.find('HTTP/1.0 200') == -1 | ||
tags: | ||
- skip_ansible_lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# post test file | ||
--- | ||
- name: install test dependencies | ||
apt: | ||
name: | ||
- net-tools | ||
- iproute2 | ||
- ethtool | ||
state: "{{ apt_install_state | default('latest') }}" | ||
update_cache: true | ||
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" | ||
|
||
- name: (re)gather facts | ||
action: setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters