forked from VeselaHouba/ansible-role-bareos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Run molecule with GitHub Actions
- Loading branch information
1 parent
cf7f95b
commit 822d8c1
Showing
3 changed files
with
74 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Molecule unit testing | ||
on: | ||
push: | ||
branches: | ||
- b2-next | ||
paths-ignore: | ||
- '**.md' | ||
- '**.rst' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.rst' | ||
|
||
jobs: | ||
molecule_test: | ||
name: ${{ matrix.distro }} - molecule test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
distro: | ||
- debian-systemd:bullseye | ||
|
||
env: | ||
MOLECULE_DISTRO: ${{ matrix.distro }} | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: mila.bareos | ||
|
||
- name: Setup python environment | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Install packages | ||
run: pip install tox | ||
|
||
- name: Run molecule test | ||
run: | | ||
cd mila.bareos && tox |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[tox] | ||
envlist = ansible{7,8} | ||
skipsdist = true | ||
|
||
[testenv] | ||
changedir = {env:PWD} | ||
passenv = | ||
MOLECULE_DISTRO | ||
INSTANCE_DISTRO | ||
TERM | ||
PY_COLORS | ||
ANSIBLE_FORCE_COLOR | ||
deps = | ||
ansible7: ansible>=7.0,<8.0 | ||
ansible8: ansible>=8.0,<9.0 | ||
molecule | ||
molecule-plugins[docker] | ||
commands = | ||
molecule test |