CI #181
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Every Sunday 2 a.m. | |
- cron: '0 2 * * 0' | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Molecule | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
distribution: | |
- openwrt/rootfs:x86-64-v22.03.6 # linux/amd64 | |
- openwrt/rootfs:x86-64-v23.05.3 # linux/amd64 | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install Molecule and test tools | |
run: pip3 install ansible-core ansible molecule 'molecule-plugins[docker]' docker yamllint ansible-lint | |
- name: Run Molecule tests | |
run: molecule test | |
env: | |
# Include colors in molecule and ansible output | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
DISTRIBUTION_TO_TEST: ${{ matrix.distribution }} | |
- name: Run Molecule tests with --check Ansible mode | |
run: molecule check | |
env: | |
# Include colors in molecule and ansible output | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
DISTRIBUTION_TO_TEST: ${{ matrix.distribution }} |