Skip to content

Commit 1806994

Browse files
authored
Replace TravisCI with GitHub actions (#352)
1 parent 063c2d0 commit 1806994

File tree

4 files changed

+85
-82
lines changed

4 files changed

+85
-82
lines changed

.github/workflows/galaxy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Ansible Galaxy import
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
jobs:
8+
galaxy:
9+
name: Galaxy
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the codebase
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Python 3
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install Ansible
21+
run: pip3 install ansible-base==2.10.3
22+
23+
- name: Import release to Ansible Galaxy
24+
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

.github/workflows/molecule.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Molecule CI/CD
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: "0 0 1 * *"
10+
jobs:
11+
molecule:
12+
name: Molecule
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
scenario:
17+
- default
18+
- default_alpine
19+
- default_centos
20+
- module
21+
- module_alpine
22+
- module_centos
23+
- plus
24+
- plus_alpine
25+
- plus_centos
26+
- source
27+
- source_alpine
28+
- source_centos
29+
- stable_push_alpine
30+
- stable_push_centos
31+
- template
32+
- template_alpine
33+
- template_centos
34+
steps:
35+
- name: Check out the codebase
36+
uses: actions/checkout@v2
37+
38+
- name: Set up Python 3
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: '3.x'
42+
43+
- name: Install Molecule dependencies
44+
run: |
45+
pip3 install ansible-base==2.10.3
46+
pip3 install ansible==2.10.3
47+
pip3 install ansible-lint==4.3.7
48+
pip3 install yamllint==1.25.0
49+
pip3 install 'molecule[docker]'==3.2.1
50+
pip3 install docker==4.4.0
51+
52+
- name: Run Molecule tests
53+
run: molecule test -s ${{ matrix.scenario }}
54+
if: contains(${{ matrix.scenario }}, 'plus') && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
55+
env:
56+
PY_COLORS: '1'
57+
ANSIBLE_FORCE_COLOR: '1'
58+
NGINX_CRT: ${{ secrets.NGINX_CRT }}
59+
NGINX_KEY: ${{ secrets.NGINX_KEY }}

.travis.yml

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

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
ENHANCEMENTS:
66

7-
* Update Molecule to `3.2.0` and Docker Python SDK to `4.4.0`.
7+
* Update Molecule to `3.2.1` and Docker Python SDK to `4.4.0`.
88
* Add Alpine `3.12` to supported platforms for NGINX Plus.
99
* Remove Alpine `3.9` and CentOS/RHEL `6` from supported platforms due to EOL.
10+
* Replace TravisCI with GitHub actions.
1011

1112
## 0.18.1 (November 17, 2020)
1213

0 commit comments

Comments
 (0)