CI #409
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: | |
pull_request: | |
schedule: | |
- cron: "5 12 * * 1" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v3 | |
with: | |
path: "${{ github.repository }}" | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip3 install yamllint | |
- name: Lint code | |
working-directory: onaio/ansible-onadata | |
run: yamllint . | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- ubuntu2204 | |
- ubuntu2004 | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v3 | |
with: | |
path: "${{ github.repository }}" | |
- name: Set up Python 3. | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install test dependencies. | |
run: pip3 install ansible molecule-plugins[docker] docker pytest-testinfra | |
- name: Run Molecule tests. | |
working-directory: onaio/ansible-onadata | |
run: molecule test | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_DISTRO: ${{ matrix.distro }} |