Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix actions #13

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
jobs:

list-scenarios:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.listscenarios.outputs.scenarios }}
steps:
Expand All @@ -22,17 +22,29 @@
name: Test
needs:
- list-scenarios
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
# Keep running so we can see if other tests pass
fail-fast: false
matrix:
scenario: ${{fromJson(needs.list-scenarios.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- uses: ome/action-ome-ansible-molecule@main
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
scenario: ${{ matrix.scenario }}
python-version: '3.8'
- name: Install Ansible & Molecule
run: |
pip install "ansible<8" "ansible-lint<6.13" flake8
pip install "molecule<5" "ansible-compat<4"
pip install molecule-plugins[docker] pytest-testinfra
pip install jmespath
- name: Run molecule
run: molecule test -s "${{ matrix.scenario }}"

#- uses: ome/action-ome-ansible-molecule@main

Check warning on line 45 in .github/workflows/molecule.yml

View workflow job for this annotation

GitHub Actions / Test (default)

45:8 [comments] missing starting space in comment

Check warning on line 45 in .github/workflows/molecule.yml

View workflow job for this annotation

GitHub Actions / Test (default)

45:7 [comments-indentation] comment not indented like content
# with:
# scenario: ${{ matrix.scenario }}

publish:
name: Galaxy
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ galaxy_info:
versions:
- 7
role_name: prometheus
namespace: ome
galaxy_tags: []
8 changes: 4 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ dependency:
role-file: molecule/default/requirements.yml
driver:
name: docker
lint:
name: yamllint
lint: |
yamllint .
ansible-lint
flake8
platforms:
- name: prometheus
image: centos/systemd:latest
Expand All @@ -33,5 +35,3 @@ scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8
2 changes: 1 addition & 1 deletion molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Docker
hosts: all
roles:
- role: ome.docker

Check failure on line 6 in molecule/default/playbook.yml

View workflow job for this annotation

GitHub Actions / Test (default)

syntax-check[specific]

the role 'ome.docker' was not found in /home/runner/work/ansible-role-prometheus/ansible-role-prometheus/molecule/default/roles:/home/runner/.cache/ansible-compat/351897/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/ansible-role-prometheus/ansible-role-prometheus/molecule/default


# Install this role
Expand All @@ -21,7 +21,7 @@
- skip_ansible_lint

roles:
- role: ansible-role-prometheus
- role: ome.prometheus
prometheus_alertmanager_slack_webhook: SLACK_WEBHOOK
prometheus_alertmanager_slack_channel: '#general'
prometheus_static_targets:
Expand Down
Loading