-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c144c4b
commit 57ba932
Showing
1 changed file
with
58 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,59 @@ | ||
--- | ||
name: Molecule Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
path: "${{ github.repository }}" | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install docker | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Test with molecule | ||
run: | | ||
molecule test | ||
name: Molecule Test | ||
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-express | ||
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-express | ||
run: molecule test | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
MOLECULE_DISTRO: ${{ matrix.distro }} |