Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

ci: run test on GitHub Actions #33

Merged
merged 9 commits into from
Jan 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install molecule
run: |
pip install --upgrade pip
pip install "molecule[docker,lint]"
- name: test
run: |
export "PATH=/home/runner/.local/bin:$PATH"
molecule test
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ansible-gvm

[![Build Status](https://github.com/suzuki-shunsuke/ansible-gvm/workflows/CI/badge.svg)](https://github.com/suzuki-shunsuke/ansible-gvm/actions)
[![GitHub last commit](https://img.shields.io/github/last-commit/suzuki-shunsuke/ansible-gvm.svg)](https://github.com/suzuki-shunsuke/ansible-gvm)
[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/suzuki-shunsuke/ansible-gvm/master/LICENSE)

Ansible Role to install [gvm](https://github.com/moovweb/gvm)

This role is based on [the official gvm-installer](https://github.com/moovweb/gvm/blob/master/binscripts/gvm-installer).
Expand Down
8 changes: 6 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
file:
dest: "{{ gvm_root | dirname }}"
state: directory
- name: check gvm_root
ansible.builtin.stat:
path: "{{ gvm_root }}"
register: st
- name: Clone gvm
git:
repo: "{{ gvm_repo }}"
dest: "{{ gvm_root }}"
version: "{{ gvm_version }}"
update: "{{ gvm_update }}"
when: not st.stat.exists
- block:
- name: Add configurations to ~/.bashrc, ~/.profile, or ~/.zshrc or etc
lineinfile:
Expand Down Expand Up @@ -54,6 +59,5 @@
src: system
dest: "{{ gvm_root }}/environments/system"
when: gvm_goroot is not undefined
- include: "{{ gvm_os_families.get(ansible_os_family, 'default') }}.yml"
static: no
- include_tasks: "{{ gvm_os_families.get(ansible_os_family, 'default') }}.yml"
when: gvm_is_dependencies_installed and ansible_os_family in gvm_os_families