Initial
This commit is contained in:
24
roles/nginxinc.nginx_unit/.github/workflows/galaxy.yml
vendored
Normal file
24
roles/nginxinc.nginx_unit/.github/workflows/galaxy.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Ansible Galaxy import
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
jobs:
|
||||
galaxy:
|
||||
name: Galaxy
|
||||
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 Ansible
|
||||
run: pip3 install ansible-base==2.10.3
|
||||
|
||||
- name: Import release to Ansible Galaxy
|
||||
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
|
41
roles/nginxinc.nginx_unit/.github/workflows/molecule.yml
vendored
Normal file
41
roles/nginxinc.nginx_unit/.github/workflows/molecule.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Molecule CI/CD
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
scenario:
|
||||
- default
|
||||
- default_centos
|
||||
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 Molecule dependencies
|
||||
run: |
|
||||
pip3 install ansible-base==2.10.3
|
||||
pip3 install ansible==2.10.3
|
||||
pip3 install ansible-lint==4.3.7
|
||||
pip3 install yamllint==1.25.0
|
||||
pip3 install 'molecule[docker]'==3.2.1
|
||||
pip3 install docker==4.4.0
|
||||
|
||||
- name: Run Molecule tests
|
||||
run: molecule test -s ${{ matrix.scenario }}
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
Reference in New Issue
Block a user