Skip to content

Commit

Permalink
test workflow (#41)
Browse files Browse the repository at this point in the history
* issue #15 : test workflow

* issue #15 : test workflow

* issue #15 : test workflow

* issue #15 : test workflow - debug pip packages

* issue #15 : test workflow - debug pip packages

* issue #15 : test workflow - use new action

* issue #15 : test workflow - use new action

* issue #15 : test workflow - fix ansible_python_interpreter

* Revert "issue #15 : test workflow - use new action"

This reverts commit b0e0caa.

* Revert "issue #15 : test workflow - use new action"

This reverts commit 7a27425.

* issue #15 : test workflow - ok

* issue #15 : test badge
  • Loading branch information
zerwes authored Dec 7, 2023
1 parent 5e0968c commit 185dbf7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: ansible test
on:
pull_request:
push:
schedule:
- cron: "45 5 * * 2"

jobs:
build:
name: ansible test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: install requirements
run: |
python -m pip install --upgrade pip
pip install ansible ansible-core lxml
- name: run ansible test
working-directory: ./test
run: |
ansible-playbook test.yml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![ansible-lint](https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense/actions/workflows/lint.yml/badge.svg?branch=linted)](https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense/actions/workflows/lint.yml)
[![ansible test](https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense/actions/workflows/test.yml/badge.svg)](https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense/actions/workflows/test.yml)

ansible-opnsense
=========
Expand Down
1 change: 1 addition & 0 deletions test/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: run test
hosts: testhosts
vars:
ansible_python_interpreter: "/usr/bin/env python" # REQUIRED for guthub action
config_path: test/{{ inventory_hostname }}.xml
local_config_path: cfg/{{ inventory_hostname }}.xml
tasks:
Expand Down

0 comments on commit 185dbf7

Please sign in to comment.