Add funnel ci test #235
Workflow file for this run
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: | |
- '*' | |
schedule: | |
# Run at 3pm on Friday. | |
# REF: https://crontab.guru/#0_3_*_*_5 | |
- cron: "0 3 * * 5" | |
defaults: | |
run: | |
working-directory: 'jason_riddle.tailscale' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v3 | |
with: | |
path: 'jason_riddle.tailscale' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install yamllint | |
- name: Lint code. | |
run: | | |
yamllint . | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- distro: debian10 # Buster | |
playbook: converge.yml | |
- distro: ubuntu1804 # Bionic Beaver | |
playbook: converge.yml | |
# TODO: Failed to get D-Bus connection: No such file or directory | |
# - distro: centos7 | |
# playbook: converge.yml | |
# TODO: Remove in future release. | |
# - distro: centos8 | |
# playbook: converge.yml | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v3 | |
with: | |
path: 'jason_riddle.tailscale' | |
- name: Set up Python 3. | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install ansible molecule-plugins[docker] docker | |
- name: Set HOSTNAME. | |
run: echo "HOSTNAME=$(cat /etc/hostname)" >> $GITHUB_ENV | |
- name: Run Molecule default test. | |
run: | | |
molecule test --scenario-name default | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
ANSIBLE_LOAD_CALLBACK_PLUGINS: true | |
ANSIBLE_STDOUT_CALLBACK: 'yaml' | |
MOLECULE_DISTRO: ${{ matrix.distro }} | |
MOLECULE_PLAYBOOK: ${{ matrix.playbook }} | |
- name: Run Molecule up test. | |
run: | | |
molecule test --scenario-name up | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
ANSIBLE_LOAD_CALLBACK_PLUGINS: true | |
ANSIBLE_STDOUT_CALLBACK: 'yaml' | |
MOLECULE_DISTRO: ${{ matrix.distro }} | |
MOLECULE_PLAYBOOK: ${{ matrix.playbook }} | |
TAILSCALE_AUTHKEY: "${{ secrets.TAILSCALE_AUTHKEY }}" | |
- name: Run Molecule funnel test. | |
run: | | |
molecule test --scenario-name funnel | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
ANSIBLE_LOAD_CALLBACK_PLUGINS: true | |
ANSIBLE_STDOUT_CALLBACK: 'yaml' | |
MOLECULE_DISTRO: ${{ matrix.distro }} | |
MOLECULE_PLAYBOOK: ${{ matrix.playbook }} |