Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 0c72a7b

Browse files
committed
Dump Travis CI and move to GitHub Actions.
1 parent 080dd1d commit 0c72a7b

File tree

6 files changed

+115
-41
lines changed

6 files changed

+115
-41
lines changed

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: CI
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: "0 7 * * 1"
10+
11+
defaults:
12+
run:
13+
working-directory: 'geerlingguy.gitlab'
14+
15+
jobs:
16+
17+
lint:
18+
name: Lint
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the codebase.
22+
uses: actions/checkout@v2
23+
with:
24+
path: 'geerlingguy.gitlab'
25+
26+
- name: Set up Python 3.
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: '3.x'
30+
31+
- name: Install test dependencies.
32+
run: pip3 install yamllint ansible-lint
33+
34+
- name: Lint code.
35+
run: |
36+
yamllint .
37+
ansible-lint
38+
39+
molecule:
40+
name: Molecule
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
distro:
45+
- distro: centos7
46+
playbook: converge.yml
47+
- distro: ubuntu1804
48+
playbook: converge.yml
49+
- distro: debian9
50+
playbook: converge.yml
51+
- distro: centos7
52+
playbook: version.yml
53+
- distro: ubuntu1804
54+
playbook: version.yml
55+
56+
steps:
57+
- name: Check out the codebase.
58+
uses: actions/checkout@v2
59+
with:
60+
path: 'geerlingguy.gitlab'
61+
62+
- name: Set up Python 3.
63+
uses: actions/setup-python@v2
64+
with:
65+
python-version: '3.x'
66+
67+
- name: Install test dependencies.
68+
run: pip3 install ansible molecule[docker] docker
69+
70+
- name: Run Molecule tests.
71+
run: molecule test
72+
env:
73+
PY_COLORS: '1'
74+
ANSIBLE_FORCE_COLOR: '1'
75+
MOLECULE_DISTRO: ${{ matrix.distro }}
76+
MOLECULE_PLAYBOOK: ${{ matrix.playbook }}

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
3+
# repository or organization.
4+
#
5+
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
6+
# See: https://github.com/ansible/galaxy/issues/46
7+
8+
name: Release
9+
'on':
10+
push:
11+
tags:
12+
- '*'
13+
14+
defaults:
15+
run:
16+
working-directory: 'geerlingguy.gitlab'
17+
18+
jobs:
19+
20+
release:
21+
name: Release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check out the codebase.
25+
uses: actions/checkout@v2
26+
with:
27+
path: 'geerlingguy.gitlab'
28+
29+
- name: Set up Python 3.
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: '3.x'
33+
34+
- name: Install Ansible.
35+
run: pip3 install ansible-base
36+
37+
- name: Trigger a new import on Galaxy.
38+
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ansible Role: GitLab
22

3-
[![Build Status](https://travis-ci.com/geerlingguy/ansible-role-gitlab.svg?branch=master)](https://travis-ci.com/geerlingguy/ansible-role-gitlab)
3+
[![CI](https://github.com/geerlingguy/ansible-role-gitlab/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-gitlab/actions?query=workflow%3ACI)
44

55
Installs GitLab, a Ruby-based front-end to Git, on any RedHat/CentOS or Debian/Ubuntu linux system.
66

molecule/default/molecule.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ dependency:
33
name: galaxy
44
driver:
55
name: docker
6-
lint: |
7-
set -e
8-
yamllint .
9-
ansible-lint
106
platforms:
117
- name: instance
128
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
File renamed without changes.

0 commit comments

Comments
 (0)