From 10521fe8389008821423cbd1c9ae1957134d9920 Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Mon, 9 Mar 2020 13:23:13 +0800 Subject: [PATCH] Use Github actions for testing. (#35) * Move linting to CI file, change badge. --- .github/workflows/main.yml | 21 +++++++++++++++++++++ .travis.yml | 11 ----------- README.md | 2 +- molecule/default/molecule.yml | 4 ---- 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e8dcd26 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,21 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install Molecule + run: pip install molecule[lint,docker] + - name: Lint + run: | + yamllint . + ansible-lint + - name: Test using Molecule + run: molecule test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7d2aca6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -sudo: required -language: python -services: - - docker -before_install: - - sudo apt-get -qq update -install: - - pip install molecule[lint,docker] -script: - - molecule test \ No newline at end of file diff --git a/README.md b/README.md index 6354aef..442f160 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ansible Role: BorgBackup Client -[![Build Status](https://travis-ci.org/borgbase/ansible-role-borgbackup.svg?branch=master)](https://travis-ci.org/borgbase/ansible-role-borgbackup) [![Ansible Galaxy](https://img.shields.io/ansible/role/30531)](https://galaxy.ansible.com/m3nu/ansible_role_borgbackup) +![Test](https://github.com/m3nu/ansible-role-borgbackup/workflows/Test/badge.svg) [![Ansible Galaxy](https://img.shields.io/ansible/role/30531)](https://galaxy.ansible.com/m3nu/ansible_role_borgbackup) Set up encrypted, compressed and deduplicated backups using [BorgBackup](https://borgbackup.readthedocs.io/en/stable/) and [Borgmatic](https://github.com/witten/borgmatic). Currently supports Debian/Ubuntu and CentOS/Red Hat. diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 1836687..67f5ea1 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -3,10 +3,6 @@ dependency: name: galaxy driver: name: docker -lint: | - set -e - yamllint . - ansible-lint platforms: - name: centos-7 image: centos:7