CI #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: "30 2 * * 0" | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: 'brunobenchimol.certbot_dns' | |
jobs: | |
yamllint: | |
name: YAML Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
with: | |
path: 'brunobenchimol.certbot_dns' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install yamllint | |
- name: Lint code. | |
run: | | |
yamllint . | |
ansible-lint: | |
name: Ansible Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
with: | |
path: 'brunobenchimol.certbot_dns' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install ansible ansible-lint | |
- name: Lint code. | |
run: | | |
ansible-lint . | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- distro: centos7 | |
playbook: converge.yml | |
experimental: false | |
- distro: centos8 | |
playbook: converge.yml | |
experimental: false | |
- distro: ubuntu2004 | |
playbook: converge.yml | |
experimental: false | |
- distro: debian10 | |
playbook: converge.yml | |
experimental: false | |
- distro: debian11 | |
playbook: converge.yml | |
experimental: false | |
# Source install started failing recently. | |
# - distro: centos7 | |
# playbook: converge-source.yml | |
# experimental: false | |
# - distro: centos8 | |
# playbook: converge-source.yml | |
# experimental: true | |
# - distro: ubuntu2004 | |
# playbook: converge-source.yml | |
# experimental: true | |
# Snap is not supported on Docker | |
# - distro: centos8 | |
# playbook: converge-snap.yml | |
# experimental: true | |
# - distro: debian11 | |
# playbook: converge-snap.yml | |
# experimental: true | |
# enable if you want test with production CA | |
# - distro: centos8 | |
# playbook: converge-issue-certificate.yml | |
# experimental: false | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
with: | |
path: 'brunobenchimol.certbot_dns' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install ansible molecule[docker] docker | |
- name: Run Molecule tests. | |
run: molecule test | |
continue-on-error: ${{ matrix.experimental }} | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_DISTRO: ${{ matrix.distro }} | |
MOLECULE_PLAYBOOK: ${{ matrix.playbook }} | |
CERTBOT_DNS_API_TOKEN: ${{ secrets.CERTBOT_DNS_API_TOKEN }} | |
CERTBOT_DNS_API_EMAIL: ${{ secrets.CERTBOT_DNS_API_EMAIL }} |